class ModelHelp {
public static function test() {
static::getInstance()->test();
}
public static function getInstance()
{
return new Model;
}
}
class Model extends ModelHelp {
public function test() {
echo 'It\'s OK';
}
public static function __callStatic($method, $parameters) {
return (new static)->$method(...$parameters);
}
}
Model::test();
PHP Fatal error: Uncaught Error: Non-static method MyModel::testMethod() cannot be called statically