summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/extract_variation11.phpt
blob: 039d474f89890959f00af671035aa2b5888dd0fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--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']);
?>
--EXPECT--
string(11) "changed.foo"