3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Create a handler function function my_assert_handler($file, $line, $code) { echo "<hr>Assertion Failed: File '$file'<br /> Line '$line'<br /> Code '$code'<br /><hr />"; // exit; } // Set up the callback assert_options(ASSERT_CALLBACK, 'my_assert_handler'); // Make an assertion that should fail assert('false');
Output for 4.3.2 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<hr>Assertion Failed: File '/in/LFAYC'<br /> Line '18'<br /> Code 'false'<br /><hr /> Warning: assert(): Assertion "false" failed in /in/LFAYC on line 18
Output for hhvm-3.10.0
Output for 4.3.0 - 4.3.1
<hr>Assertion Failed: File '/in/LFAYC'<br /> Line '18'<br /> Code 'false'<br /><hr /> Warning: assert() [http://www.php.net/function.assert]: Assertion "false" failed in /in/LFAYC on line 18