global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / clsmethodf.php
blob2467168613bc36bd4a1bb3157e0b5acdb2f4f654
1 <?hh
3 class aa {
4 protected function blah() {
5 echo "protected aa::blah\n";
6 var_dump($this);
9 protected function func($o) {
10 echo "protected aa::blah\n";
11 var_dump($o === $this);
14 public static function callfunc() {
15 self::func(null);
16 self::func(null);
19 public function __call($name, $args) {
20 $args = count($args);
21 echo "magic call to aa->$name with $args arguments\n";
25 class a extends aa {
26 protected function blah() {
27 echo "private a::blah\n";
30 public static function stat() {
31 echo "public static a::stat\n";
34 public function nons() {
35 $str = 'blah';
36 self::$str();
37 self::stat();
38 parent::blah();
40 parent::func(null);
41 parent::func($this);
42 parent::func(null);
43 parent::func($this);
45 parent::callfunc();
47 self::fakemethod(1, 2, 3);
48 self::fakemethod();
52 function main() {
53 $a = new a();
54 $a->nons();
56 main();