xref: /PHP-8.0/ext/opcache/tests/bug77310_1.phpt (revision 6f75890e)
1--TEST--
2Bug #77310 (1): Incorrect SCCP for compound assign to arrays
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
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