3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string of words with multiple vowels.'; $old = str_split($string); $new = array(); while ($old) { $chr = array_pop($old); if (stripos("aeiou", $chr) !== false) { break; } array_unshift($new, $chr); } echo implode("", $old) . implode("", $new);

preferences:
45.74 ms | 402 KiB | 5 Q