summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-01-12 23:56:04 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-01-12 23:56:04 +0000
commit22a6b8f1a401a8c136cec389427eb0fd9ed3cf2b (patch)
treeadc2e5e0d1645719bdd1c22cb217155622b03f85
parent58d3451c75794417c36fc1dc7fe70e1d1e605d97 (diff)
downloadphp-git-22a6b8f1a401a8c136cec389427eb0fd9ed3cf2b.tar.gz
Added test case for bug #21600
-rw-r--r--tests/lang/bug21600.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lang/bug21600.phpt b/tests/lang/bug21600.phpt
new file mode 100644
index 0000000000..71c39bb2e5
--- /dev/null
+++ b/tests/lang/bug21600.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #21600 (assign by reference function call changes variable contents)
+--FILE--
+<?php
+$tmp = array();
+$tmp['foo'] = "test";
+$tmp['foo'] = &bar($tmp['foo']);
+var_dump($tmp);
+
+function bar($text){
+ return $text;
+}
+?>
+--EXPECT--
+array(1) {
+ ["foo"]=>
+ string(4) "test"
+}
+