xref: /PHP-7.4/Zend/tests/exception_012.phpt (revision 782352c5)
1--TEST--
2Test exception doesn't cause RSHUTDOWN bypass, variation 1
3--INI--
4assert.bail=1
5assert.exception=1
6--FILE--
7<?php
8
9$func = create_function('', 'define("Mommy", 1); assert(false);');
10$func();
11
12?>
13--EXPECTHEADERS--
14Content-type: text/html; charset=UTF-8
15--EXPECTF--
16Deprecated: Function create_function() is deprecated in %s on line %d
17
18Fatal error: Uncaught AssertionError: assert(false) in %sexception_012.php(%d) : runtime-created function:%d
19Stack trace:
20#0 %sexception_012.php(%d) : runtime-created function(%d): assert(false, 'assert(false)')
21#1 %sexception_012.php(%d): __lambda_func()
22#2 {main}
23  thrown in %sexception_012.php(%d) : runtime-created function on line %d
24