global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / shuffle1.php
blobb20d025607ecad3431efd5ed43691792ac1e9e0e
1 <?hh
3 function get($a, $idx) {
4 $max = 10;
5 for ($i = 0; $i < $max; $i++) {
6 $r = $a[$idx];
7 $r = $a[0];
8 $r = $a[1];
9 $r = $a[2];
11 return $a[$idx];
14 $a = array('a', 2, false);
15 var_dump(get($a, 1));
17 $a = array('a'=>'b', 1=>'c', 2=>4, 'c'=>3, 0=>'hello');
18 var_dump(get($a, 1));