3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function path_relative_to($path, $rel) { $rel_lent = strlen($rel); if (strncmp($path, $rel, strlen($rel)) == 0) { return substr($path, strlen($rel)); } else { return ""; } } var_dump(basename("/");
Output for 5.3.0 - 5.4.11
Parse error: syntax error, unexpected ';' in /in/c44Tc on line 16
Process exited with code 255.