Hi,
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. See https://3v4l.org/X8omS ,
which is against OOP and LSP.
I belive, we can allow parameter rename, but we should throw if "already
seen parameter name is at a different position".
I am not that good in C to fix this, so only reporting. I belive, we
should fix this issue asap and merge into PHP 8.
Also - for further discussion - I think, we can even allow parameter
rename, but still allow to use the old name (which, with fix above, will
always result to the same param position). Example:
https://3v4l.org/kgHWf (now an error, it violates OOP/LSP again)
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek