Posts Tagged e_strict
PHP Programming with E_STRICT beware!
Posted by Erik Bauffman in default on October 16, 2009
I recently switched to programming PHP with error_reporting set to E_STRICT, since I want to know what’s going on. You have to watch out when extending classes and trying to overrule the parameters of the child method. An example:

When executing you will get the following error “Strict Standards: Declaration of B::test() should be compatible with that of A::test() in /path/to/file/test.php on line 18”
When I remove the parameter ‘value’ from the method ‘test’ in the class ‘B’, everything’s fine. Write that down.