我的服务器上有一个php5.2(无法更新),它在static::routin()
调用时出错。如何解决?无论如何,有没有一种方法可以检测这种类型的呼叫是否可用,以便添加智能呼叫机制?
发布于 2012-08-28 20:31:58
延迟静态绑定只适用于PHP5.3。要在5.2版中获得被调用的类名,您必须使用变通方法。
From the manual:
As of PHP 5.3.0, PHP implements a feature called late static bindings which can be used to reference the called class in a context of static inheritance.
One work around exists here。
https://stackoverflow.com/questions/12159230
复制相似问题