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
/
jmpfuse.php
blob
eaab8612e10e71dc616647dae32dc10f15aec01a
1
<
?hh
2
3
4
function
jmpfuse
(
$str
) {
5
$pos
=
0
;
6
while
(
strlen
(
$str
) >
$pos
+
2
&&
7
$str
[
$pos
] ==
'/'
&&
8
$str
[
$pos
+
1
] ==
'*'
&&
9
(
$pos
=
strpos
(
$str
,
'*/'
,
$pos
+
2
)) !==
false
) {
10
$pos
+
=
2
;
11
}
12
return true
;
13
}
14
15
function
main
() {
16
foreach
(
range
(
1
,
100
)
as
$i
) {
17
jmpfuse
(
"blah blah
\n
"
);
18
}
19
var_dump
(
"jumps fused?"
);
20
}
21
22
main
();