Here's an alternative - though you may want to benchmark yours and mine to see which comes out on top. As I'm not aware of any function which does position location with an array - I use the string replacement function which does take an array to make the word you are processing simpler to process.
Take the word you are processing, replace all it's vowels with a filler character (best to choose a character which is already considered a vowel so you don't get a false positive when doing the strpos function) and save it to a temporary variable which you call the strpos function on. You can then use the $pos variable to identify where the first vowel is with the original, unmodified $word variable.
//Array of symbols used to represent vowels in a system not unlike X-SAMPA
$kirshenbaum['vowels'] = array(
'A', '&', 'a', 'V', '@', 'e', '3', 'I', 'i', '0', 'O', 'o', 'u', 'U'
$simpleWord = str_replace( $kirshenbaum['vowels'], '@', $word );
$pos = strpos( $simpleWord, '@' );
This saves you from the loop. Then it's a question of whether the loop or the str_replace function is faster in execution. And that will likely depend on how long the word is, how many vowels it has, and where the first vowel occurs.
- C. Aaron Smith