Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65122 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26833 invoked from network); 23 Jan 2013 20:43:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2013 20:43:58 -0000 Authentication-Results: pb1.pair.com header.from=nathan.bruer@starin.biz; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=nathan.bruer@starin.biz; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain starin.biz from 207.198.105.69 cause and error) X-PHP-List-Original-Sender: nathan.bruer@starin.biz X-Host-Fingerprint: 207.198.105.69 hawk.starindns.com Received: from [207.198.105.69] ([207.198.105.69:38063] helo=hawk.starindns.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/13-30997-C8B40015 for ; Wed, 23 Jan 2013 15:43:57 -0500 Received: from 173-167-160-145-illinois.hfc.comcastbusiness.net ([173.167.160.145]:63723 helo=NathanBruerHP) by hawk.starindns.com with esmtpa (Exim 4.80) (envelope-from ) id 1Ty7Am-00087f-Ai; Wed, 23 Jan 2013 14:43:52 -0600 Sender: "Nathan Bruer" To: "'Ralph Schindler'" , References: <510038C9.5000900@mrclay.org> <51004156.1060806@ralphschindler.com> In-Reply-To: <51004156.1060806@ralphschindler.com> Date: Wed, 23 Jan 2013 14:43:56 -0600 Message-ID: <268601cdf9aa$5de6dd60$19b49820$@starin.biz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQLZFiGmIRp5w+tX5jO7AzP70biU1gE/8sk/ljcl+iA= Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hawk.starindns.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - starin.biz X-Get-Message-Sender-Via: hawk.starindns.com: authenticated_id: nathan.bruer@starin.biz Subject: RE: [PHP-DEV] C# properties vs. accessors RFC From: nathan@starin.biz >Personally, I don't see why 'default' can't be used: >class Foo { > public $bar { get; set; default 5; } } > >This solves the var_dump() problem, and if people want dynamic get returning something other than the property/field value, so be it. >C# does indeed have an internal field per property though, even if it is an anonymous backing field. Is there a reason we cannot just have var_dump/print_r show it more like this? object(Time)#1 (2) { ["seconds"]=> int(16200) ["hours"]=> NULL ["hours:getter"]=> float(4.5) } (Although I am against the idea of having a *hidden* value accessible inside the getter/setter)