From: foobar Date: Mon, 30 Jun 2003 17:30:16 +0000 (+0000) Subject: Added test case for bug #24396 X-Git-Tag: BEFORE_ARG_INFO~527 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b377225d4fb578438ec7a1c6f0684dbbef7e6e8a;p=php Added test case for bug #24396 --- diff --git a/tests/lang/bug24396.phpt b/tests/lang/bug24396.phpt new file mode 100644 index 0000000000..b78e4b8757 --- /dev/null +++ b/tests/lang/bug24396.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #24396 (global $$variable broken) +--FILE-- + 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)