Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63278 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70964 invoked from network); 8 Oct 2012 11:53:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Oct 2012 11:53:27 -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.41 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.41 relay-hub205.domainlocalhost.com Received: from [74.115.204.41] ([74.115.204.41:44706] helo=relay-hub205.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/E9-07529-2BEB2705 for ; Mon, 08 Oct 2012 07:53:26 -0400 Received: from MBX202.domain.local ([169.254.169.44]) by HUB205.domain.local ([192.168.68.49]) with mapi id 14.02.0283.003; Mon, 8 Oct 2012 07:52:46 -0400 To: "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] Propety Accessors v1.1 Thread-Index: Ac2lRqaw0wLAVcGGQAyyWuaNO91x4Q== Date: Mon, 8 Oct 2012 11:52:44 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE485612B3B48@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: multipart/alternative; boundary="_000_9570D903A3BECE4092E924C2985CE485612B3B48MBX202domainloc_" MIME-Version: 1.0 Subject: [PHP-DEV] [RFC] Propety Accessors v1.1 From: cpriest@zerocue.com (Clint Priest) --_000_9570D903A3BECE4092E924C2985CE485612B3B48MBX202domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 f= or PHP 5.5 release. It's come a long way since the last time I posted abou= t 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 & static c= ontext, 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 reasons f= or 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, thi= s 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 t= ests 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 relea= se, only a few things remain to be completed/updated: * Check on reflection code written prior to major changes (tests st= ill pass) * Add a few more reflection functions that were requested In total there are 79 tests for this new functionality, if there are any ot= hers that I have missed, please let me know. -Clint --_000_9570D903A3BECE4092E924C2985CE485612B3B48MBX202domainloc_--