1--TEST-- 2Testing __call and __callstatic 3--FILE-- 4<?php 5 6class a { 7 public function __call($a, $b) { 8 print "__call: ". $a ."\n"; 9 } 10 static public function __callStatic($a, $b) { 11 print "__callstatic: ". $a ."\n"; 12 } 13 public function baz() { 14 self::Bar(); 15 } 16} 17 18 19$a = new a; 20 21$b = 'Test'; 22$a::$b(); 23$a->$b(); 24 25$a->baz(); 26 27a::Foo(); 28 29?> 30--EXPECT-- 31__callstatic: Test 32__call: Test 33__call: Bar 34__callstatic: Foo 35