Overloading constructors, no warning?


so Iam extending a ParentClass with a ChildClass. 

This is the ParentClass constructor

This is the ChildClass constructor

Is it now allowed to have different Signatures in overriden functions in PHP? I expected to get some warnings from Code Inspection.

I know, this might not be the correct forum for this, but I resetted the Code Inspection Options and still get no error.


Iam using PhpStorm 2019.1.1 and Php 7.3.4



1 comment

Looks like you can override constructors & have different signatures: https://3v4l.org/ig5Dc


Please sign in to leave a comment.