Home >Backend Development >PHP Tutorial >Why Does PHP Throw 'Strict Standards: Declaration of childClass::customMethod() Should Be Compatible with that of parentClass::customMethod()'?
Compatibility in PHP Method Declarations
In PHP, the error "Strict Standards: Declaration of childClass::customMethod() should be compatible with that of parentClass::customMethod()" indicates a discrepancy between the declaration of a method in a child class and its parent method.
Possible Causes:
The error occurs when the child method has either:
Finding Compatibility Information:
PHP uses the following rules to define method compatibility:
Additional documentation and examples on method compatibility can be found in the following PHP Manual pages:
The above is the detailed content of Why Does PHP Throw 'Strict Standards: Declaration of childClass::customMethod() Should Be Compatible with that of parentClass::customMethod()'?. For more information, please follow other related articles on the PHP Chinese website!