3v4l.org

run code in 200+ PHP versions simultaneously
<?php function asdf() { var_dump(__FUNCTION__); function asd() { var_dump(__FUNCTION__); } } asdf(); asd(); asdf();
Output for 4.3.2 - 7.3.4
string(4) "asdf" string(3) "asd" string(4) "asdf" Fatal error: Cannot redeclare asd() (previously declared in /in/qVnmj:7) in /in/qVnmj on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(4) "asdf" string(3) "asd" string(4) "asdf" Fatal error: Cannot redeclare asd() (previously declared in /in/qVnmj:7) in /in/qVnmj on line 6