First, declare that this is a STRICT error. If you do not open it in error_reporting, it is generally invisible. below is my code {code ...} it will report {code ...} if it is a public function overload, you can still say the past, and I just used a method with the same name in the private function... first, declare that this is
STRICTError. If you are not there
error_reportingOpen it, usually not visible, the following is my code
It will report an error
Strict Standards: Declaration of B::test() should be compatible with that of A::test() in /home/work/test.php on line 17
If yespublicFunction overloading can still be said in the past, but I only use methods with the same name in private functions, but this is not an overload for subclass. Why is this still a warning?
Reply content:First, declare that this isSTRICTError. If you are not thereerror_reportingOpen it, usually not visible, the following is my code
It will report an error
Strict Standards: Declaration of B::test() should be compatible with that of A::test() in /home/work/test.php on line 17
If yespublicFunction overloading can still be said in the past, but I only use methods with the same name in private functions, but this is not an overload for subclass. Why is this still a warning?
Post link: http://stackoverflow.com/questions/31...
In this case, STRICT mode requires:
1. The access level is the same
2. The parameters are the same
3. The default parameter values are the same.