Re: Re: Ambiguity in the oop5 visibility docs

From: Date: Sat, 26 May 2018 14:29:08 +0000
Subject: Re: Re: Ambiguity in the oop5 visibility docs
References: 1 2 3  Groups: php.doc php.internals 
Request: Send a blank email to phpdoc+get-969386954@lists.php.net to get a copy of this message
On 25.05.2018 at 19:47, Rowan Collins wrote: > On 25 May 2018 13:29:41 BST, "Christoph M. Becker" <cmbecker69@gmx.de> > wrote: >> >> I think we should discuss this on the internals@ mailing list. Perhaps >> the current behavior is by design, and will “never” change. > > Given that PHP is largely "duck typed", it would also be possible for class > A to never declare the onSomethingHook method, and call it anyway (maybe > checking with method_exists first): https://3v4l.org/hOEuO Thanks, Rowan! I had not considered duck typing, but when doing so, it is pretty clear that we do not want to change the current behavior, and as such the patch should be rejected. -- Christoph M. Becker

« previous php.doc (#969386954) next »