__callStatic(): instantiating objects from static context?
问题 I am confused about how "static" and "dynamic" functions and objects in PHP work together especially with regards to __callStatic(). How __callStatic() works: You can have a normal class MyClass, where within the class you can put a static function called __callStatic(), which gets called only when MyClass doesn't have a static function by the name you want. i.e. I call MyClass::newFunction(); newFunction() is called statically but MyClass does not have it declared. So, then __callStatic()