Strict Standards: Declaration of childClass::customMethod() should be compatible with that of parentClass::customMethod()
PHP 中出现此错误的可能原因是什么?我在哪里可以找到关于兼容意味着什么的信息?
最佳答案
childClass::customMethod()
与 parentClass::customMethod()
具有不同的参数或访问级别(公共(public)/私有(private)/ protected )。
关于php - 方法声明应与 PHP 中的父方法兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3115388/