Overloading constructors, no warning?

Hello,

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

 

Regards

1 comment

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

0

Please sign in to leave a comment.