How can a method in a class be passed like this? Where are the instructions in the PHP manual?
PHP Code
Class autoloader{public static function Myloader ($classname) { $class _file = Strtolower ($classname). ". PHP "; if (file_exists ($class _file)) { require_once ($class _file);}} } Passing classes and methods in the form of arrays, element one is the class name, element two is the method name//method is static method Spl_autoload_register (Array ("AutoLoader", "Myloader")); $test = new Test () ;
Where do the PHP manuals pass classes and methods in the form of arrays?
PHP Code
Passing classes and methods in the form of arrays, element one is the class name, element two is the method name//method is static method Spl_autoload_register (Array ("AutoLoader", "Myloader"));
------Solution--------------------
Callback? The method name of the class (object) must be passed this way, from PHP4.
As for the manual, I did not see the description. However, many of the conventions of PHP are not explained in the manual.
After all, the handbook is not textbook