1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
--TEST-- Test typed properties allow fetch reference for init array --FILE-- <?php class Foo { public int $bar = 1; } $foo = new Foo(); $array = [&$foo->bar]; var_dump($array); ?> --EXPECT-- array(1) { [0]=> &int(1) }