__callStatic()
is triggered when invoking inaccessible methods in a static context.
But when you did foo::bar()
from a non-static context (in your code, __construct
method is non-static context) will be a non-static call, unless the function is explicitly defined as static.
So if you really want to use __callStatic()
in the __construct
method, you could use it directly.
public function __construct() {
self::__callStatic('something', array());
}