DEV Community

Discussion on: Daily Challenge #3 - Vowel Counter

Collapse
 
martyhimmel profile image
Martin Himmel

PHP

function count_vowels(string $str) {
    return preg_match_all('/([aeiou])./', strtolower($str));
}