Here's my solution:
preg_match_all("/[aeiou]/i", $string, $matches);
echo "Number of vowels : " . countVowels("sUpercalifragilisticexpialidocious");
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.