xref: /PHP-8.1/ext/opcache/tests/jit/assign_055.phpt (revision a8bd3423)
1--TEST--
2JIT ASSIGN: memory leak
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9--FILE--
10<?php
11set_error_handler(function() {
12    (y);
13});
14$ret = new stdClass;
15try {
16    $ret = $y;
17} catch (y) {
18}
19?>
20--EXPECTF--
21Fatal error: Uncaught Error: Undefined constant "y" in %sassign_055.php:3
22Stack trace:
23#0 %sassign_055.php(7): {closure}(2, 'Undefined varia...', '%s', 7)
24#1 {main}
25  thrown in %sassign_055.php on line 3