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
Fix memoization of functions called with keyset arguments
[hiphop-php.git]
/
hphp
/
test
/
quick
/
coverage.php
blob
432d635fc84983906438e64a1f8c80074aa08b7f
1
<
?php
2
3
function
b
(
$s
) {
4
if
(
$s
===
'floo'
) {
5
return
12
;
6
}
7
$GLOBALS
[
'z'
] =
234
;
8
return
8
;
9
}
10
11
function
a
(
$b
) {
12
if
(
$b
) {
13
$x
=
'floo'
;
14
}
else
{
15
$x
=
'fleeee'
;
16
}
17
b
(
$x
);
18
}
19
20
function
f
() {
21
for
(
$i
=
0
;
$i
<
4
;
++
$i
) {
22
a
(
$i
<
3
);
23
$GLOBALS
[
'tmp'
] =
$i
;
24
$i
=
$GLOBALS
[
'tmp'
];
25
}
26
}
27
28
function
enable
() {
29
echo
"Going to enable
\n
"
;
30
fb_enable_code_coverage
();
31
echo
"Enabled
\n
"
;
32
$GLOBALS
[
'z'
] =
3
;
33
}
34
35
function
doenable
() {
36
global
$y
;
37
enable
();
38
$y
+
=
43
;
39
}
40
41
function
main
() {
42
echo
"About to enable
\n
"
;
43
doenable
();
44
echo
"Done enabling
\n
"
;
45
f
();
46
$r
=
fb_disable_code_coverage
();
47
unset
(
$r
[
'systemlib.phpfb'
]);
48
var_dump
(
$r
);
49
}
50
main
();