3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string of words with multiple vowels.'; function asdf($string){ for ($i=strlen($string); $i >= 0 ; $i--) { if (strpos("aeiouAEIOU", substr($string, $i, 1)) !== false) { return substr_replace($string, "", $i, 1); } } return $string; } echo asdf($string);

preferences:
40.99 ms | 402 KiB | 5 Q