Hello. 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');
}
$date = new DateTime();
echo $date->localTime();
Realisation draft already written (
https://github.com/rjhdby/php-src/commit/a54d7d3f8504d2e15908bb0e44de0b2f87683872
)
It is interesting or not?
