Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65095 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14821 invoked from network); 22 Jan 2013 21:41:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2013 21:41:15 -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 67.200.53.250 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 67.200.53.250 mail.zerocue.com Received: from [67.200.53.250] ([67.200.53.250:37294] helo=mail.zerocue.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/50-12923-A770FF05 for ; Tue, 22 Jan 2013 16:41:14 -0500 Received: from [172.16.10.217] (unknown [97.79.213.78]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.zerocue.com (Postfix) with ESMTPSA id 69D23120363; Tue, 22 Jan 2013 21:41:10 +0000 (UTC) Message-ID: <50FF0773.2070600@zerocue.com> Date: Tue, 22 Jan 2013 15:41:07 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Levi Morrison CC: PHP Developers Mailing List References: <50F840F4.7080704@zerocue.com> <50FE7579.1010409@zerocue.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Property Accessors for 5.5 From: cpriest@zerocue.com (Clint Priest) On 1/22/2013 9:24 AM, Levi Morrison wrote: >> For those that have voted against this proposal, are there any >> clarifications that can be made or questions answered? > I can say that this bit is particularly confusing: > > public $foo {} > > My understanding that this code will not emit any warnings when > interpreted, but the $foo property has no getter nor setter. You can > call isset which will return false but unset will emit a warning, yes? This is correct except in the case where you are inheriting the property. The above, on it's own class would be pointless. > I would think that the above snippet would create a property with all > public, default implementations. If you are looking to create a public property with default implementations, the following will suffice and has for a long time: public $foo; > I see why it doesn't: it doesn't > permit you to declare only a getter and no setter. Not sure what you mean here, you can declare a property with a getter and no setter, such as: public $foo { get; } Which allows the property to be read, but not written, this is what the asymmetrical access is about. > This is just one more reason for me to vote no on this. -- -Clint