xref: /PHP-8.1/Zend/tests/bug27268.phpt (revision 610c7fbe)
1--TEST--
2Bug #27268 (Bad references accentuated by clone)
3--FILE--
4<?php
5class A
6{
7    public function &getA()
8    {
9        return $this->a;
10    }
11}
12
13$A = new A;
14$A->a = array(1);
15$x = $A->getA();
16$clone = clone $A;
17$clone->a = array();
18print_r($A);
19?>
20--EXPECT--
21A Object
22(
23    [a] => Array
24        (
25            [0] => 1
26        )
27
28)
29