xref: /PHP-8.2/Zend/tests/bug55305.phpt (revision 902d6439)
1--TEST--
2Bug #55305 (ref lost: 1st ref instantiated in class def, 2nd ref made w/o instantiating)
3--FILE--
4<?php
5#[AllowDynamicProperties]
6class Foo {
7  var $foo = "test";
8}
9
10$f = new Foo();
11$f->bar =& $f->foo;
12var_dump($f->foo);
13var_dump($f->bar);
14?>
15--EXPECT--
16string(4) "test"
17string(4) "test"
18