Fix memoization of functions called with keyset arguments
[hiphop-php.git] / hphp / test / quick / coverage.php
blob432d635fc84983906438e64a1f8c80074aa08b7f
1 <?php
3 function b($s) {
4 if ($s === 'floo') {
5 return 12;
7 $GLOBALS['z'] = 234;
8 return 8;
11 function a($b) {
12 if ($b) {
13 $x = 'floo';
14 } else {
15 $x = 'fleeee';
17 b($x);
20 function f() {
21 for ($i = 0; $i < 4; ++$i) {
22 a($i < 3);
23 $GLOBALS['tmp'] = $i;
24 $i = $GLOBALS['tmp'];
28 function enable() {
29 echo "Going to enable\n";
30 fb_enable_code_coverage();
31 echo "Enabled\n";
32 $GLOBALS['z'] = 3;
35 function doenable() {
36 global $y;
37 enable();
38 $y += 43;
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);
50 main();