xref: /PHP-8.1/ext/opcache/tests/jit/gh12509.phpt (revision 5f46d869)
1--TEST--
2GH-12509: JIT assertion when running php-parser tests
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6--FILE--
7<?php
8function capture() {
9    $GLOBALS["x"] = new Exception();
10}
11function test($a) {
12    $a[1] = 1;
13    $a[2] = 2;
14    capture();
15    $a[3] = 3;
16    return $a;
17}
18var_dump(test([]));
19?>
20--EXPECT--
21array(3) {
22  [1]=>
23  int(1)
24  [2]=>
25  int(2)
26  [3]=>
27  int(3)
28}