repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
global statement removal: hphp/test [7/x]
[hiphop-php.git]
/
hphp
/
test
/
quick
/
shuffle1.php
blob
b20d025607ecad3431efd5ed43691792ac1e9e0e
1
<
?hh
2
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
];
10
}
11
return
$a
[
$idx
];
12
}
13
14
$a
=
array
(
'a'
,
2
,
false
);
15
var_dump
(
get
(
$a
,
1
));
16
17
$a
=
array
(
'a'
=>
'b'
,
1
=>
'c'
,
2
=>
4
,
'c'
=>
3
,
0
=>
'hello'
);
18
var_dump
(
get
(
$a
,
1
));
19