3v4l.org

run code in 200+ 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 7.2.0
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/Jotlu on line 10 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 Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/Jotlu on line 11 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 5.4.8 - 5.4.25, 5.4.36 - 7.1.10
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 5.4.26 - 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.3.28, 5.4.0 - 5.4.7
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: assert() expects exactly 1 parameter, 2 given in /in/Jotlu on line 11
Output for 5.3.29
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.5 - 5.2.17
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: Wrong parameter count for assert() in /in/Jotlu on line 11
Output for 4.3.2 - 4.3.4
Warning: phpinfo,mail() 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: Wrong parameter count for assert() in /in/Jotlu on line 11
Output for 4.3.0 - 4.3.1
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