1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
--TEST-- Bug #71603 (compact() maintains references in php7) --FILE-- <?php $foo = "okey"; $foo_reference =& $foo; $array = compact('foo_reference'); $foo = 'changed!'; var_dump($array['foo_reference']); ?> --EXPECT-- string(4) "okey"