xref: /PHP-8.1/ext/opcache/tests/bug77310_1.phpt (revision e9f783fc)
1--TEST--
2Bug #77310 (1): Incorrect SCCP for compound assign to arrays
3--EXTENSIONS--
4opcache
5--FILE--
6<?php
7
8function breakit($data_arr) {
9    $foo[0] = "";
10    for ($i = 0; $i < count($data_arr); $i++) {
11        $foo[0] .= $data_arr[$i];
12    }
13    echo $foo[0] . "\n";
14}
15
16$data = ['zero', 'one', 'two'];
17breakit($data);
18
19?>
20--EXPECT--
21zeroonetwo
22