3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php assert_options(ASSERT_CALLBACK, function($file, $line, $code, $message) { if (empty($message)) { $message = $code; } var_dump(array($message)); }); assert('FALSE');
based on bpunR
Output for 7.2.0
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/iK7vu on line 11 Warning: assert(): Assertion "FALSE" failed in /in/iK7vu on line 11 Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 3 passed and exactly 4 expected in /in/iK7vu:4 Stack trace: #0 [internal function]: {closure}('/in/iK7vu', 11, 'FALSE') #1 /in/iK7vu(11): assert('FALSE') #2 {main} thrown in /in/iK7vu on line 4
Process exited with code 255.
Output for 7.1.0 - 7.1.10
Warning: assert(): Assertion "FALSE" failed in /in/iK7vu on line 11 Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 3 passed and exactly 4 expected in /in/iK7vu:4 Stack trace: #0 [internal function]: {closure}('/in/iK7vu', 11, 'FALSE') #1 /in/iK7vu(11): assert('FALSE') #2 {main} thrown in /in/iK7vu on line 4
Process exited with code 255.
Output for 5.3.0 - 7.0.20
Warning: Missing argument 4 for {closure}() in /in/iK7vu on line 4 array(1) { [0]=> string(5) "FALSE" } Warning: assert(): Assertion "FALSE" failed in /in/iK7vu on line 11
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/iK7vu on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/iK7vu on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/iK7vu on line 4
Process exited with code 255.