Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63281 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77949 invoked from network); 8 Oct 2012 12:58:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Oct 2012 12:58:16 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.80 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.80 relay-hub206.domainlocalhost.com Received: from [74.115.204.80] ([74.115.204.80:56410] helo=relay-hub206.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/0B-07529-5EDC2705 for ; Mon, 08 Oct 2012 08:58:15 -0400 Received: from MBX202.domain.local ([169.254.169.44]) by HUB206.domain.local ([192.168.68.50]) with mapi id 14.02.0283.003; Mon, 8 Oct 2012 08:57:36 -0400 To: Paul Dragoonis CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] Property Accessors v1.1 Thread-Index: Ac2lVHSFI+EH/hJ4QpSong/bfG1eRQ== Date: Mon, 8 Oct 2012 12:57:36 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE485612B3B91@MBX202.domain.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.25] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] [RFC] Property Accessors v1.1 From: cpriest@zerocue.com (Clint Priest) Each time I've posted the RFC for review more has come up so I suppose at t= his point it needs to go through a waiting period on further comments and t= hen in 2 weeks? =20 > -----Original Message----- > From: Paul Dragoonis [mailto:dragoonis@gmail.com] > Sent: Monday, October 08, 2012 7:50 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 >=20 > Good work Clint! >=20 > Performance is probably one of the things people will complain about so i= t's good that your benchmark is proving that it's merely > identical to the old __get() approach. >=20 > What remains on your TODO list for this functionality? > When are you planning to run an RFC vote on this? >=20 > I think this would be a valuable addition to PHP 5.5. >=20 > Cheers, > Paul. >=20 > On Mon, Oct 8, 2012 at 1:42 PM, Clint Priest wrote: > > As an update, just ran some performance testing: > > > > master > > Cycles Direct = Getter __get > > v1.4 @ 10/8/2012 1m .05s = .21s .20s > > > > php 5.5.0-dev > > Cycles Direct = Getter __get > > v1.4 @ 10/8/2012 1m .04s = n/a .21s > > > > Performance of property accessors was important to me as I'm sure it wi= ll be to many, on one million cycles of a simple getter, it's > <.01s difference. Depending on the run it is sometimes exactly the same = performance. > > > >> -----Original Message----- > >> From: Clint Priest [mailto:cpriest@zerocue.com] > >> Sent: Monday, October 08, 2012 6:53 AM > >> To: internals@lists.php.net > >> Subject: [PHP-DEV] [RFC] Propety Accessors v1.1 > >> > >> It's been a while since I posted any updates about this, a few > >> individuals have been asking about it privately and wanting me to get = it out the door for PHP 5.5 release. It's come a long way since > the last time I posted about it. > >> > >> RFC Document: > >> https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented > >> > >> Example Usage: > >> > >> class TimePeriod { > >> private $Seconds =3D 3600; > >> > >> public $Hours { > >> get { return $this->Seconds / 3600; } > >> set { $this->Seconds =3D $value; } > >> isset { return isset($this->Seconds); } > >> unset { unset($this->Seconds); } > >> } > >> } > >> > >> Changes / Updates > >> > >> * isset/unset accessor functions now implemented (object & sta= tic context, auto implementations, etc) > >> > >> * static accessor now fully functional > >> > >> * Reference functionality validated, tests written > >> > >> * All operators have been tested, tests written > >> > >> * read-only and write-only keywords: Added explanation of reas= ons for inclusion at the top of the appropriate RFC section > >> > >> * Tested for speed, approaches or meets __get() speed. > >> > >> Internally things have changed quite a bit > >> > >> * cleaned up and simplified > >> > >> * had been using 4 to 5 additional fn_flag slots, now down to = two (READ_ONLY and WRITE_ONLY) > >> > >> * the automatic implementations now compiled internal php code= , this greatly simplified that part of the code and future > proofed > >> it. > >> > >> The code is available at the url below and is up to date with master, = all tests pass. > >> https://github.com/cpriest/php-src > >> > >> I'd like to get this project wrapped up in time to make it to the 5.5 = release, only a few things remain to be completed/updated: > >> > >> * Check on reflection code written prior to major changes (tes= ts still pass) > >> > >> * Add a few more reflection functions that were requested > >> > >> In total there are 79 tests for this new functionality, if there are a= ny others that I have missed, please let me know. > >> > >> -Clint > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, > > visit: http://www.php.net/unsub.php > >