On 25.09.2018 at 08:50, Stanislav Malyshev wrote:

>> I want to do RFS proposal for new language concept - Class extension 
>> functions.
>>
>> Syntax will looks like:
>>
>> function DateTime->localTime() {
>>     return $this->format('H:i');
>> }
> 
> I think this wouldn't add much what we already can do, […]

Actually, we can do this for a long time (by using runkit_method_add[1]
or uopz_add_function[2]); it would just add a syntactic sugar for it.

> […] but will invite
> style of programming that is best avoided.

ACK.

[1] <http://php.net/manual/en/function.runkit-method-add.php>
[2] <http://php.net/manual/en/function.uopz-add-function.php>

-- 
Christoph M. Becker

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

Reply via email to