3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $g = function($str, $separator, $reverse = FALSE) { $f = $reverse ? 'strrpos' : 'strpos'; if (($pos = $f($str, $separator)) !== FALSE) { $str = substr($str, 0, $pos); } return $str; } var_dump($g('001_add_blog.php', '.'));
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected 'var_dump' (T_STRING) in /in/jLR8v on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/jLR8v on line 12
Process exited with code 255.