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
/
array_pos.php
blob
0fc752bea5ce41d66fa66673ea754f3cb71a9708
1
<
?hh
2
// test manually created array
3
function
main
() {
4
$x
=
null
;
5
$a
=
array
();
6
$a
[
0
] =
'zero'
;
7
$a
[
1
] =
'one'
;
8
var_dump
(
current
(&
$a
));
// should print 'zero'
9
// test static array
10
$a
=
array
(
'zero'
,
'one'
);
11
var_dump
(
current
(&
$a
));
12
// test packed array
13
$a
=
array
(
'zero'
, (
$x
?
'one'
:
'one'
));
14
var_dump
(
current
(&
$a
));
15
}
16
main
();