Here is my answer:
<?php
$word = readline();
echo countVowels($word);
function countVowels($input) {
$count = 0;
for ($i = 0; $i < strlen($input); $i++) {
$current = strtolower($input[$i]);
if ($current == "a" || $current == "u" || $current == "i" || $current == "e" || $current == "o") {
$count++;
}
}
return $count;
}