Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103246 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81918 invoked from network); 24 Sep 2018 15:13:35 -0000 Received: from unknown (HELO relay.alfa-bank.ru) (217.12.97.18) by pb1.pair.com with SMTP; 24 Sep 2018 15:13:35 -0000 Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id 0783D161CC; Mon, 24 Sep 2018 14:21:11 +0300 (+03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alfabank.ru; s=mainstream; t=1537788071; bh=5gjQzBWUYTKDNR6VgfhXpemGQZdoJLyQnRS0XZ1HkCA=; h=To:From:Date; b=NAXi/+Xdm8G04ZZ4XBS0XGh5Tcza7YHvS/LSgfm3T8LoP9BP3BRnQYONU1HxztbMM zOpnNObL8JgTTOXQbcwQ/Wnufw0sdKibnjEHc//ulBNuIlzt9Pd42nziUP7u2ft9zk ybakQPVrpGqj3Ffs4b+WvnRTfUz4ipkjuO6NPh08= Received: from relay.alfa-bank.ru (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7526D161C7 for ; Mon, 24 Sep 2018 14:21:03 +0300 (+03) Received: from SMTP1.alfaintra.net (unknown [172.28.1.129]) by relay.alfa-bank.ru (Postfix) with ESMTP for ; Mon, 24 Sep 2018 14:21:03 +0300 (+03) To: internals@lists.php.net MIME-Version: 1.0 X-KeepSent: C3B3B597:83B37DA6-43258312:003C9894; type=4; name=$KeepSent Message-ID: Date: Mon, 24 Sep 2018 14:21:02 +0300 X-MIMETrack: Serialize by Router on SMTP1/Internet(Release 9.0.1FP7|August 17, 2016) at 24.09.2018 14:21:03, Serialize complete at 24.09.2018 14:21:03 Content-Type: multipart/alternative; boundary="=_alternative 003E597643258312_=" X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1826-8.2.0.1013-24114.005 X-TMASE-Version: IMSVA-9.1.0.1826-8.2.1013-24114.005 X-TMASE-Result: 10--0.181300-10.000000 X-TMASE-MatchedRID: +a7s2rq5EbaUocUWkvA59W/+RwWenb0Ym/y00tE9StYGW3hFnC9N1UnC M4OR855dRfii1oNRcwuOMDjZHc3LHVWJFcGbVLzQ/zHKAEIZbPQGAD6h6FZmEdjPKewyT8Tfo8W MkQWv6iXgT2zXYa9/nRQF+BLVItD4wrbXMGDYqV/5/uWxuMfGVTaApHI4cWRltFcUfB7XBQUrcQ I4RdrWRWwZHPJ4LQozQqKs056hM4W3Sp3/U/kuJhuOyo8ojp7JXZJVDH6yAKDUbO7XTeBnID1vl mZmFJt11r0cM3fIbtAqaC9yagjLhwGEYqM6C3xTG2HNA48VRudSQbMx3B9diUl2qvewVlhOfnyf KxK/2Pk8m4Yzy0waxQ== X-TMASE-SNAP-Result: 1.821001.0001-0-2-1:0,12:0,22:0,33:0,34:0-0 Subject: Pre proposal for "Class extension functions" From: AGromov@alfabank.ru (Andrey O Gromov) --=_alternative 003E597643258312_= Content-Type: text/plain; charset="US-ASCII" 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? --=_alternative 003E597643258312_=--