]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Mon, 30 Jun 2003 17:30:17 +0000 (17:30 +0000)
committerSVN Migration <svn@php.net>
Mon, 30 Jun 2003 17:30:17 +0000 (17:30 +0000)
tests/lang/bug24396.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug24396.phpt b/tests/lang/bug24396.phpt
new file mode 100644 (file)
index 0000000..b78e4b8
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Bug #24396 (global $$variable broken)
+--FILE--
+<?php
+
+$arr = array('a' => 1, 'b' => 2, 'c' => 3);
+
+foreach($arr as $k=>$v)  {
+    global $$k; // comment this out and it works in PHP 5 too..
+               
+    echo "($k => $v)\n";
+                       
+    $$k = $v;          
+}
+?>
+--EXPECT--
+(a => 1)
+(b => 2)
+(c => 3)