xref: /php-src/Zend/tests/gh16293_001.phpt (revision 817d21ec)
1--TEST--
2GH-16293: Exception in assert() callback with bail enabled
3--FILE--
4<?php
5
6@assert_options(ASSERT_EXCEPTION, 0);
7@assert_options(ASSERT_BAIL, 1);
8@assert_options(ASSERT_CALLBACK, 'f1');
9assert(false);
10
11?>
12--EXPECTF--
13Warning: assert(): assert(false) failed in %s on line %d
14
15Warning: Uncaught Error: Invalid callback f1, function "f1" not found or invalid function name in %s:%d
16Stack trace:
17#0 %s(%d): assert(false, 'assert(false)')
18#1 {main}
19  thrown in %s on line %d
20