Declaration of Methods should be Compatible with Parent Methods in PHP

waiwai933 picture waiwai933 · Jun 25, 2010 · Viewed 139.1k times · Source
Strict Standards: Declaration of childClass::customMethod() should be compatible with that of parentClass::customMethod()

What are possible causes of this error in PHP? Where can I find information about what it means to be compatible?

Answer

davidtbernal picture davidtbernal · Jun 25, 2010

childClass::customMethod() has different arguments, or a different access level (public/private/protected) than parentClass::customMethod().