xref: /php-src/ext/opcache/tests/jit/gh17140_1.phpt (revision 2104097a)
1--TEST--
2GH-17140 (Assertion failure in JIT trace exit with ZEND_FETCH_DIM_FUNC_ARG)
3--EXTENSIONS--
4opcache
5--INI--
6opcache.jit=1254
7opcache.jit_buffer_size=32M
8opcache.jit_hot_func=1
9opcache.jit_hot_side_exit=1
10--FILE--
11<?php
12namespace Foo;
13function test() {
14    $a['x'][1] = true;
15    for ($fusion = 0; $i < 3; $i++) {
16        var_dump($a['x'][0]);
17    }
18}
19test();
20?>
21--EXPECTF--
22Warning: Undefined variable $i in %s on line %d
23
24Warning: Undefined array key 0 in %s on line %d
25NULL
26
27Warning: Undefined variable $i in %s on line %d
28
29Warning: Undefined array key 0 in %s on line %d
30NULL
31
32Warning: Undefined array key 0 in %s on line %d
33NULL
34