1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/gh16293_001.phpt
Ilija Tovilo b5c09b1a61 Fix exception in assert() callback with bail enabled
Fixes GH-16293
Closes GH-16304
2024-10-14 13:59:26 +02:00

20 lines
476 B
PHP

--TEST--
GH-16293: Exception in assert() callback with bail enabled
--FILE--
<?php
assert_options(ASSERT_EXCEPTION, 0);
assert_options(ASSERT_BAIL, 1);
assert_options(ASSERT_CALLBACK, 'f1');
assert(false);
?>
--EXPECTF--
Warning: assert(): assert(false) failed in %s on line %d
Warning: Uncaught Error: Invalid callback f1, function "f1" not found or invalid function name in %s:%d
Stack trace:
#0 %s(%d): assert(false, 'assert(false)')
#1 {main}
thrown in %s on line %d