xref: /PHP-5.3/tests/lang/bug24396.phpt (revision b377225d)
1--TEST--
2Bug #24396 (global $$variable broken)
3--FILE--
4<?php
5
6$arr = array('a' => 1, 'b' => 2, 'c' => 3);
7
8foreach($arr as $k=>$v)  {
9    global $$k; // comment this out and it works in PHP 5 too..
10
11    echo "($k => $v)\n";
12
13    $$k = $v;
14}
15?>
16--EXPECT--
17(a => 1)
18(b => 2)
19(c => 3)
20