php-src/ext/standard/tests/array/extract_variation10.phpt
Arnaud Le Blanc 6a6289a90d MFH: Fixed bugs #44181 & #44182 (extract() and references)
(robin_fernandes at uk dot ibm dot com)
2008-11-26 00:59:41 +00:00

14 lines
326 B
PHP

--TEST--
Test extract() function - ensure EXTR_REFS doesn't mess with isRef flag on COW references to array elements.
--FILE--
<?php
$a = array('foo' => 'original.foo');
$nonref = $a['foo'];
$ref = &$a;
extract($a, EXTR_REFS);
$a['foo'] = 'changed.foo';
var_dump($nonref);
?>
--EXPECTF--
%unicode|string%(12) "original.foo"