On 25.05.2018 at 19:47, Rowan Collins wrote:

> On 25 May 2018 13:29:41 BST, "Christoph M. Becker" <cmbecke...@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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to