mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
6a6289a90d
(robin_fernandes at uk dot ibm dot com)
14 lines
343 B
PHP
14 lines
343 B
PHP
--TEST--
|
|
Test extract() function - ensure EXTR_REFS works when array is referenced and keys clash with variables in current scope.
|
|
--FILE--
|
|
<?php
|
|
$a = array('foo' => 'original.foo');
|
|
$ref = &$a;
|
|
$foo = 'test';
|
|
extract($a, EXTR_OVERWRITE|EXTR_REFS);
|
|
$foo = 'changed.foo';
|
|
var_dump($a['foo']);
|
|
?>
|
|
--EXPECTF--
|
|
%unicode|string%(11) "changed.foo"
|