xref: /PHP-8.4/Zend/tests/bug68262.phpt (revision 4b892439)
1--TEST--
2Bug #68262: Broken reference across cloned objects
3--FILE--
4<?php
5
6class C {
7    public $p;
8}
9
10$first = new C;
11$first->p = 'init';
12
13$clone = clone $first;
14$ref =& $first->p;
15unset($ref);
16
17$clone = clone $first;
18$clone->p = 'foo';
19
20var_dump($first->p);
21
22?>
23--EXPECT--
24string(4) "init"
25