Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24688 invoked from network); 28 Jun 2012 09:54:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jun 2012 09:54:41 -0000 Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 209.85.217.170 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:43436] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/B8-08168-0E92CEF4 for ; Thu, 28 Jun 2012 05:54:41 -0400 Received: by lbgc1 with SMTP id c1so3252407lbg.29 for ; Thu, 28 Jun 2012 02:54:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=FiJKVkmIVTq4dgkWToFSaMs3GQ6lVoNSf8b4eEXPI3E=; b=oPemXpWVjzDkku1Ef0xa6Dxmz5HZoQVcdi9gtHkG/LGFPjsZpO2Nmgs33c2RPxwurL GXGsgDe2roe7lpX2RNe3dp8cXYSGOv1so3AjIS6SXvcSSoXv2cFfYiy8gy0mij3wjbaL rIcA1RCu+tO6NpKXytw2YgOoIwoeL15SiH7ZpZVVfL8qHrKewqADug0opBLqCASxTf9F ZPoZI+/UGFO0ePk2EdUe/2vulPblv0a9b9pq+z0eAuS3P6ynCZZGPfj3oeeaiHZdrHqK DR5xfLMZfzlFziiQV/caKMaDEBKkiTT4jAVsNTNZOyVD5o/aaC6BavnRrYS9RR4+OF8B T21w== MIME-Version: 1.0 Received: by 10.152.146.169 with SMTP id td9mr1353190lab.42.1340877276917; Thu, 28 Jun 2012 02:54:36 -0700 (PDT) Received: by 10.112.98.131 with HTTP; Thu, 28 Jun 2012 02:54:36 -0700 (PDT) X-Originating-IP: [178.200.247.30] In-Reply-To: <9570D903A3BECE4092E924C2985CE48555BE665A@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> <4F910311.7040406@sugarcrm.com> <9570D903A3BECE4092E924C2985CE48555BE6562@MBX202.domain.local> <4F937C00.3090104@sugarcrm.com> <9570D903A3BECE4092E924C2985CE48555BE665A@MBX202.domain.local> Date: Thu, 28 Jun 2012 11:54:36 +0200 Message-ID: To: Clint M Priest Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8f234589c72f8304c38551f0 X-Gm-Message-State: ALoCoQkh/kER7iCqf6OVO/XNGsBTuFIhEXGL4pzQiW4ypwvj2fs06KPb6WPJ07rzwcZMiY8UmZdN Subject: Re: [PHP-DEV] RFC: Property get/set syntax From: kontakt@beberlei.de (Benjamin Eberlei) --e89a8f234589c72f8304c38551f0 Content-Type: text/plain; charset=ISO-8859-1 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 > sure what exactly you consider to be a bug. > > I see, well the only way to resolve this would be to add isset and unset > property 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 > syntax 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 > > --e89a8f234589c72f8304c38551f0--