xref: /PHP-8.2/Zend/tests/gh16293_002.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, function () {
9    throw new Exception('Boo');
10});
11assert(false);
12
13?>
14--EXPECTF--
15Warning: assert(): assert(false) failed in %s on line %d
16
17Warning: Uncaught Exception: Boo in %s:%d
18Stack trace:
19%a
20