xref: /PHP-7.3/Zend/tests/bug34518.phpt (revision 610c7fbe)
1--TEST--
2Bug #34518 (Unset doesn't separate container in CV)
3--FILE--
4<?php
5$arr = array(1,2,3);
6$arr["foo"] = array(4,5,6);
7$copy = $arr;
8
9unset($copy["foo"][0]);
10print_r($arr);
11print_r($copy);
12?>
13--EXPECT--
14Array
15(
16    [0] => 1
17    [1] => 2
18    [2] => 3
19    [foo] => Array
20        (
21            [0] => 4
22            [1] => 5
23            [2] => 6
24        )
25
26)
27Array
28(
29    [0] => 1
30    [1] => 2
31    [2] => 3
32    [foo] => Array
33        (
34            [1] => 5
35            [2] => 6
36        )
37
38)
39