3v4l.org

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

preferences:
61.14 ms | 402 KiB | 5 Q