Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60254 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45217 invoked from network); 22 Apr 2012 02:36:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Apr 2012 02:36:10 -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.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:57679] helo=relay-hub205.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/54-28308-99E639F4 for ; Sat, 21 Apr 2012 22:36:10 -0400 Received: from MBX202.domain.local ([169.254.19.147]) by HUB205.domain.local ([192.168.69.5]) with mapi id 14.01.0355.002; Sat, 21 Apr 2012 22:36:05 -0400 To: Stas Malyshev CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] RFC: Property get/set syntax Thread-Index: AQHNHr9pMXjVRwJgf0WuCXUx2dlgNpamIqQw Date: Sun, 22 Apr 2012 02:36:05 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE48555BE6562@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> <4F910311.7040406@sugarcrm.com> In-Reply-To: <4F910311.7040406@sugarcrm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.26] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] RFC: Property get/set syntax From: cpriest@zerocue.com (Clint M Priest) > How these would work with isset - what !empty($this->Hours) return? What = would happen if you do unset($this->Hours)? What happens if you do $this->H= ours++ or sort($this->Hours) (assuming $Hours is an array)? > These things need to be defined in the RFC too. So I've just tested these things and the accessors perform the same way as = with __get()/__set(). 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? unset() - Would unset a temporary variable (the one returned by the getter)= -- see previous email re: adding unset/isset property functions. sort() - Does the same thing as with __get()/__set() which is to say, the a= rray is sorted but the property is not updated with the value. Should acce= ssor behave differently than the magic methods? Should this just be docume= nts or should this be fixed? -Clint