php-src/ext/standard/tests/array/bug71603.phpt

16 lines
238 B
Plaintext
Raw Normal View History

--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"