xref: /PHP-8.2/Zend/tests/gh16293_001.phpt (revision b5c09b1a)
1--TEST--
2GH-16293: Exception in assert() callback with bail enabled
3--FILE--
4<?php
5
6assert_options(ASSERT_EXCEPTION, 0);
7assert_options(ASSERT_BAIL, 1);
8assert_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