3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php eval(' if (false) echo "true\n"; else echo "false\n"; '); eval(' if (false) echo "true\n";; else echo "false\n"; ');
Output for 7.0.18 - 7.0.27, 7.1.4 - 7.2.1
false Parse error: syntax error, unexpected 'else' (T_ELSE), expecting end of file in /in/0vsMV(10) : eval()'d code on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.17, 7.1.0 - 7.1.3
false Parse error: syntax error, unexpected 'else' (T_ELSE), expecting end of file in /in/0vsMV(15) : eval()'d code on line 4
Process exited with code 255.
Output for hhvm-3.22.0
false Fatal error: syntax error, unexpected T_ELSE, expecting $end in /in/0vsMV(-1)(afd17e050b48566aaf1346c6facf52a6) : eval()'d code on line -1
Output for hhvm-3.18.4 - 3.21.3
false Fatal error: syntax error, unexpected T_ELSE, expecting $end in /in/0vsMV(15)(afd17e050b48566aaf1346c6facf52a6) : eval()'d code on line 4
Output for 5.6.0 - 5.6.30
false Parse error: syntax error, unexpected 'else' (T_ELSE) in /in/0vsMV(15) : eval()'d code on line 4