xref: /PHP-8.2/ext/opcache/tests/bug77434.phpt (revision e9f783fc)
1--TEST--
2Bug #77434: php-fpm workers are segfaulting in zend_gc_addref
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11
12function test(int $x) {
13    $a = ['a' => 0, 'b' => $x];
14    $b = [];
15    $b[0] = $a;
16    $c = $b[0];
17}
18
19function test2(int $x) {
20    $a = ['a' => 0, 'b' => $x];
21    $b = [$a];
22    $c = $b[0];
23}
24
25?>
26===DONE===
27--EXPECT--
28===DONE===
29