Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60255 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48498 invoked from network); 22 Apr 2012 03:33:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Apr 2012 03:33:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.183 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.183 smtp183.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.183] ([67.192.241.183:57552] helo=smtp183.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/B4-28308-E0C739F4 for ; Sat, 21 Apr 2012 23:33:35 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp8.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 332C080B2; Sat, 21 Apr 2012 23:33:31 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp8.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 8C2CC80A5; Sat, 21 Apr 2012 23:33:23 -0400 (EDT) Message-ID: <4F937C00.3090104@sugarcrm.com> Date: Sat, 21 Apr 2012 21:33:20 -0600 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Clint M Priest CC: "internals@lists.php.net" References: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> <4F910311.7040406@sugarcrm.com> <9570D903A3BECE4092E924C2985CE48555BE6562@MBX202.domain.local> In-Reply-To: <9570D903A3BECE4092E924C2985CE48555BE6562@MBX202.domain.local> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Property get/set syntax From: smalyshev@sugarcrm.com (Stas Malyshev) 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 sure what exactly you consider to be a bug. > 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. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227