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
enable coroutine for rust emitter
[hiphop-php.git]
/
hphp
/
test
/
slow
/
array_iterator
/
440.php
blob
b38cbf0b7ac7ecd79486293d07a072fdeb13e6a0
1
<
?hh
2
3
4
<<
__EntryPoint
>>
5
function
main_440
() {
6
$a
=
varray
[
1
,
2
,
3
,
4
,
5
,
6
];
7
while
(
$v
=
each
(
inout
$a
)) {
8
if
(
$v
[
1
] <
4
)
$a
[] =
$v
[
1
]
+
$v
[
1
];
9
}
10
var_dump
(
$a
);
11
$a
=
varray
[
1
,
2
,
3
,
4
,
5
,
6
];
12
foreach
(
$a
as
$k
=>
$v
) {
13
if
(
$v
>=
4
)
$a
=
$v
+
$v
;
14
}
15
var_dump
(
$a
);
16
}