xref: /PHP-8.1/Zend/tests/bug79364.phpt (revision 2462f2da)
1--TEST--
2Bug #79364 (When copy empty array, next key is unspecified)
3--FILE--
4<?php
5$a = [1, 2];
6unset($a[1], $a[0]);
7$b = $a;
8
9$a[] = 3;
10$b[] = 4;
11
12var_dump($a, $b);
13?>
14--EXPECT--
15array(1) {
16  [2]=>
17  int(3)
18}
19array(1) {
20  [2]=>
21  int(4)
22}
23