global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / hopt_fpi.php
blob67cdd7f37c6c96a76544d7c51e374806bad2df3f
1 <?hh
2 // Copyright 2004-2015 Facebook. All Rights Reserved.
4 class C {
5 function f1($a, $b) {
6 return $a + $b;
9 function f2($a) {
10 return $a + 1;
13 // Note: we have a bug in hackir if we remove the $this's below
14 function test($a) {
15 $x = $this->f1($this->f2($a), $a);
16 echo $x;
17 echo "\n";
21 //$x = new C();
22 //$x->test(1);
24 function f3($a, $b) {
25 return $a + $b;
28 function f4($a) {
29 return $a + 1;
32 /* Note: we have a bug in hackir if we remove the $this's below */
33 function test($a, $f1, $f2) {
34 $x = $f1($f2($a), $a);
35 echo $x;
36 echo "\n";
39 test(1, "f3", "f4");