3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Active assert and make it quiet assert_options(ASSERT_ACTIVE, 1); // Set up the callback assert_options(ASSERT_CALLBACK, 'phpinfo'); // Make an assertion that should fail assert('2 < 1'); assert('2 < 1', '<img src=1>');
Output for 5.4.36 - 5.6.28, 7.0.0 - 7.1.0
Warning: phpinfo() has been disabled for security reasons in /in/Jotlu on line 10 Warning: assert(): Assertion "2 < 1" failed in /in/Jotlu on line 10 Warning: phpinfo() has been disabled for security reasons in /in/Jotlu on line 11 Warning: assert(): <img src=1>: "2 < 1" failed in /in/Jotlu on line 11
Output for hhvm-3.10.0 - 3.12.0
Catchable fatal error: Argument 1 passed to phpinfo() must be an instance of int, string given in /in/Jotlu on line 10
Process exited with code 255.
Output for 5.4.8 - 5.4.35
Warning: phpinfo() expects at most 1 parameter, 3 given in /in/Jotlu on line 10 Warning: assert(): Assertion "2 < 1" failed in /in/Jotlu on line 10 Warning: phpinfo() expects at most 1 parameter, 4 given in /in/Jotlu on line 11 Warning: assert(): <img src=1>: "2 < 1" failed in /in/Jotlu on line 11
Output for 5.3.0 - 5.4.7
Warning: phpinfo() expects at most 1 parameter, 3 given in /in/Jotlu on line 10 Warning: assert(): Assertion "2 < 1" failed in /in/Jotlu on line 10 Warning: assert() expects exactly 1 parameter, 2 given in /in/Jotlu on line 11
Output for 4.3.2 - 5.2.17
Warning: phpinfo() expects at most 1 parameter, 3 given in /in/Jotlu on line 10 Warning: assert(): Assertion "2 < 1" failed in /in/Jotlu on line 10 Warning: Wrong parameter count for assert() in /in/Jotlu on line 11
Output for 4.3.1
Warning: phpinfo() expects at most 1 parameter, 3 given in /in/Jotlu on line 10 Warning: assert() [http://www.php.net/function.assert]: Assertion "2 < 1" failed in /in/Jotlu on line 10 Warning: Wrong parameter count for assert() in /in/Jotlu on line 11
Output for 4.3.0
Warning: phpinfo,mail() has been disabled for security reasons in /in/Jotlu on line 10 Warning: assert() [http://www.php.net/function.assert]: Assertion "2 < 1" failed in /in/Jotlu on line 10 Warning: Wrong parameter count for assert() in /in/Jotlu on line 11