I couldn't find the answer myself, so I'll ask here: in #PHP, why can't I override a class method with a more specific argument?
See snippet: https://3v4l.org/nikF1
like this
I couldn't find the answer myself, so I'll ask here: in #PHP, why can't I override a class method with a more specific argument?
See snippet: https://3v4l.org/nikF1
like this
Valentin Nivuahc
•I guess itβs to respect the Liskov Substitution Principle.
Someone asks the same question as you in stackoverflow :https://stackoverflow.com/a/21656325.
Answers are interresting : )
Hypolite Petovan
•Daniel Neuman
•Hypolite Petovan likes this.
Christoph S
•Hypolite Petovan likes this.