-
- class A{
- public $name;
- function test1($a){
- echo "test1111";
- }
- function test2($a){
- echo "test2222";
- }
- //When an object calls a method and the method does not exist, the system will automatically call __call()
- function __call($method,$val){
- echo "Method not found in class: ".$method;
- }
- }
- $aaa = new A();
- $aaa ->test(1);
- ?>
-
Copy the code
Output result:
Method not found in class: test
|