Ok it's a documented behaviour, I should read more carefully. http://php.net/manual/en/language.oop5.decon.php Unlike with other methods, PHP will not generate an E_STRICT level error message when __construct() is overridden with different parameters than the parent __construct() method has.
But I think, it's a lack in PHP ? On Fri, 28 Oct 2011 17:22:53 +0200, Jean-Sébastien H. <jean...@au-fil-du.net> wrote: > Hi, > > Is it an expected behaviour ? > > See attached test file. > > > ---- EXPECTED OUTPUT > Strict Standards: Declaration of ObjChild::method() should be > compatible with that of ObjParent::method() in %s on line 15 > > Strict standards: Declaration of ObjChild::__construct() should be > compatible with that of ObjParent::__construct() in %s on line 17 > ---- ACTUAL OUTPUT > Strict Standards: Declaration of ObjChild::method() should be > compatible with that of ObjParent::method() in %s on line 15 > > ---- FAILED > > > > NB : > The real actual output of the phpt is empty. Can we test strict error > with run-tests ? > > > Regards, > -- > Jean-Sébastien H. > au-fil-du.net -- Jean-Sébastien H. au-fil-du.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php