summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/extract_variation11.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/extract_variation11.phpt')
-rw-r--r--ext/standard/tests/array/extract_variation11.phpt13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/standard/tests/array/extract_variation11.phpt b/ext/standard/tests/array/extract_variation11.phpt
new file mode 100644
index 0000000..7f6e08c
--- /dev/null
+++ b/ext/standard/tests/array/extract_variation11.phpt
@@ -0,0 +1,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']);
+?>
+--EXPECTF--
+%unicode|string%(11) "changed.foo"