3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string of words with multiple vowels.'; function asdf($string){ $len = strlen($string) for ($i = $len; $i >= 0 ; $i--) { if (strpos("aeiouAEIOU", substr($string, $i, 1)) !== false) { return substr_replace($string, "", $i, 1); } } return $string; } echo asdf($string);
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'for' (T_FOR) in /in/PTWoe on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FOR in /in/PTWoe on line 6
Process exited with code 255.

preferences:
183.24 ms | 1395 KiB | 67 Q