Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61114 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29360 invoked from network); 9 Jul 2012 02:46:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jul 2012 02:46:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.40 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.40 relay-hub204.domainlocalhost.com Received: from [74.115.204.40] ([74.115.204.40:37325] helo=relay-hub204.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/4A-36077-3164AFF4 for ; Sun, 08 Jul 2012 22:46:46 -0400 Received: from MBX202.domain.local ([169.254.149.228]) by HUB204.domain.local ([192.168.69.4]) with mapi id 14.02.0283.003; Sun, 8 Jul 2012 22:46:41 -0400 To: Benjamin Eberlei CC: Stas Malyshev , "internals@lists.php.net" Thread-Topic: [PHP-DEV] RFC: Property get/set syntax Thread-Index: AQIDtoEcVZsXNKIcUjIkjZWAqDpT2wI2zibcAdygaHYBNHn7fQFcz5kRAngSp5WWaqZ10A== Date: Mon, 9 Jul 2012 02:46:40 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE4855867BD45@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> <4F910311.7040406@sugarcrm.com> <9570D903A3BECE4092E924C2985CE48555BE6562@MBX202.domain.local> <4F937C00.3090104@sugarcrm.com> <9570D903A3BECE4092E924C2985CE48555BE665A@MBX202.domain.local> In-Reply-To: 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_9570D903A3BECE4092E924C2985CE4855867BD45MBX202domainloc_" MIME-Version: 1.0 Subject: RE: [PHP-DEV] RFC: Property get/set syntax From: cpriest@zerocue.com (Clint Priest) --_000_9570D903A3BECE4092E924C2985CE4855867BD45MBX202domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I've just recently had my second child and closed on a new house, so been a= bit busy. I'll be working to finish up what's left in the coming weeks. Right now I'm told there are some conflicts with a merge from master that I= have to resolve, then the fork will be ready for playing around with. Hop= efully I'll have that fixed up later this week. From: Benjamin Eberlei [mailto:kontakt@beberlei.de] Sent: Thursday, June 28, 2012 4:55 AM To: Clint Priest Cc: Stas Malyshev; internals@lists.php.net Subject: Re: [PHP-DEV] RFC: Property get/set syntax What is the state here with regard to merge into php-src? On Sun, Apr 22, 2012 at 5:48 AM, Clint M Priest > wrote: > -----Original Message----- > From: Stas Malyshev [mailto:smalyshev@sugarcrm.com] > Sent: Saturday, April 21, 2012 10:33 PM > To: Clint M Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] RFC: Property get/set syntax > > Hi! > > > empty() - Returns true for a property retrieved via __get() or via a > > getter -- Any idea why this would be the case for __get()? Is this a > > bug? > > isset() calls __isset(), empty() calls __isset() and __get(). I'm not sur= e what exactly you consider to be a bug. I see, well the only way to resolve this would be to add isset and unset pr= operty functions as well. Anyone against it? > > > unset() - Would unset a temporary variable (the one returned by the > > getter) -- see previous email re: adding unset/isset property > > functions. > > unset() calls __unset(). > > > sort() - Does the same thing as with __get()/__set() which is to say, > > the array is sorted but the property is not updated with the value. > > Should accessor behave differently than the magic methods? Should > > this just be documents or should this be fixed? > > sort() works just fine if you define __get to return by-ref. Returning by reference was not documented in the original RFC, would this s= yntax work for everyone? public $Hours { &get { return $this->a; } } > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php --_000_9570D903A3BECE4092E924C2985CE4855867BD45MBX202domainloc_--