<?php
assert_options(ASSERT_CALLBACK, "assert_handler");
function assert_handler($file, $line, $assertion, $description="")
{
echo "* assert_handler('$file', '$line', '$assertion', '$description') called";
return true;
}
assert('false == true');
assert(false == true);
assert(false == true, "Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler");
Deprecated: Constant ASSERT_CALLBACK is deprecated in /in/1G2Zo on line 2
Deprecated: Function assert_options() is deprecated in /in/1G2Zo on line 2
* assert_handler('/in/1G2Zo', '11', '', 'assert(false == true)') called
Fatal error: Uncaught AssertionError: assert(false == true) in /in/1G2Zo:11
Stack trace:
#0 /in/1G2Zo(11): assert(false, 'assert(false ==...')
#1 {main}
thrown in /in/1G2Zo on line 11
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Deprecated: Constant ASSERT_CALLBACK is deprecated in /in/1G2Zo on line 2
Deprecated: Function assert_options() is deprecated in /in/1G2Zo on line 2
* assert_handler('/in/1G2Zo', '11', '', 'assert(false == true)') called
Fatal error: Uncaught AssertionError: assert(false == true) in /in/1G2Zo:11
Stack trace:
#0 /in/1G2Zo(11): assert(false, 'assert(false ==...')
#1 {main}
thrown in /in/1G2Zo on line 11
Process exited with code 255.
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '10', 'false == true', '') called
Warning: assert(): Assertion "false == true" failed in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '11', '', 'assert(false == true)') called
Warning: assert(): assert(false == true) failed in /in/1G2Zo on line 11
* assert_handler('/in/1G2Zo', '12', '', 'Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler') called
Warning: assert(): Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler failed in /in/1G2Zo on line 12
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.3.32, 7.4.26
* assert_handler('/in/1G2Zo', '10', 'false == true', '') called
Warning: assert(): Assertion "false == true" failed in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '11', '', 'assert(false == true)') called
Warning: assert(): assert(false == true) failed in /in/1G2Zo on line 11
* assert_handler('/in/1G2Zo', '12', '', 'Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler') called
Warning: assert(): Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler failed in /in/1G2Zo on line 12
* assert_handler('/in/1G2Zo', '10', 'false == true', '') called
Warning: assert(): Assertion "false == true" failed in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '11', '', '') called
Warning: assert(): Assertion failed in /in/1G2Zo on line 11
* assert_handler('/in/1G2Zo', '12', '', 'Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler') called
Warning: assert(): Expected assert() to fail for this test and emit the actual test as 3rd parameter to handler failed in /in/1G2Zo on line 12
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.7
* assert_handler('/in/1G2Zo', '10', 'false == true', '') called
Warning: assert(): Assertion "false == true" failed in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '11', '', '') called
Warning: assert(): Assertion failed in /in/1G2Zo on line 11
Warning: assert() expects exactly 1 parameter, 2 given in /in/1G2Zo on line 12
* assert_handler('/in/1G2Zo', '10', 'false == true', '') called
Warning: assert(): Assertion "false == true" failed in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '11', '', '') called
Warning: assert(): Assertion failed in /in/1G2Zo on line 11
Warning: Wrong parameter count for assert() in /in/1G2Zo on line 12
Output for 4.3.0 - 4.3.1
* assert_handler('/in/1G2Zo', '10', 'false == true', '') called
Warning: assert() [http://www.php.net/function.assert]: Assertion "false == true" failed in /in/1G2Zo on line 10
* assert_handler('/in/1G2Zo', '11', '', '') called
Warning: assert() [http://www.php.net/function.assert]: Assertion failed in /in/1G2Zo on line 11
Warning: Wrong parameter count for assert() in /in/1G2Zo on line 12