Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否可以创建一个扩展另一个魔术对象的魔术对象(使用 PHP)。
我不完全确定你在问什么......你想显式调用父类的魔法方法吗?如果是这样,您可以使用该类的parent参考:
parent
class Object extends dbObj{ // ... // this is what i'm assuming you're looking for: public function __call($method, $variables){ return parent::__call($method, $variables); } }