I see, guys, what is the single reason to allowing this dangerous
inheritance?
https://3v4l.org/X8omS parameters renamed, result with named parameters
is different
https://3v4l.org/kgHWf renamed parameter, call with named parameters
does not succeed at all (which violated basic principe of OOP
inheritance at least)
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 26 Oct 2020 15:36, Rowan Tommins wrote:
On 26/10/2020 13:12, Michael Voříšek - ČVUT FEL wrote:
I am writing regarding bug 80248.
Currently, PHP 8 allows parameter reuse at different position, which I
belive is very dangerous, as passed parameters may be passed in a
different order with different object impl.
Hi Michael,
Yes, this was one of the most discussed aspects of named parameters. There were
a few proposals for how it should work, but in the end none of them gained
consensus, and Nikita decided to keep things simple.
I suggest having a look at the RFC [https://wiki.php.net/rfc/named_params] and
its main discussion thread [https://externals.io/message/110004] to see the
pros and cons of various alternatives.
Since none of these were adopted in the proposal, it's not clear that this
could be considered a bug, rather than a feature change, so there'd need to be
a very strong justification for re-visiting it this close to 8.0 availability.
Regards,
--
Rowan Tommins (né Collins)
[IMSoP]