Fix memoization of functions called with keyset arguments
[hiphop-php.git] / hphp / test / quick / CGetG.php
blob26a40ab7f5c82392894414c1bdde2043b87b8eac
1 <?php
3 $n = 10;
4 $vals = array();
5 $a = array();
7 function main() {
8 for ($i = 0; $i < 10; $i++) {
9 $vals[] = $GLOBALS['n'];
11 var_dump($vals);
13 for ($i = 0; $i < 10; $i++) {
14 $gname = "a" . (string)$i;
15 $GLOBALS[$gname] = $i;
18 printf("%016x\n", 1 << $GLOBALS['a0']);
19 printf("%016x\n", 1 << $GLOBALS['a1']);
20 printf("%016x\n", 1 << $GLOBALS['a2']);
21 printf("%016x\n", 1 << $GLOBALS['a3']);
23 $GLOBALS[42] = "---42---";
24 $a[] = $GLOBALS[42];
25 $a[] = $GLOBALS["42"];
26 var_dump($a);
29 main();