Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71430 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22921 invoked from network); 23 Jan 2014 11:31:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2014 11:31:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:44537] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/90-18911-67DF0E25 for ; Thu, 23 Jan 2014 06:31:04 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id EB10F10C013; Thu, 23 Jan 2014 11:30:58 +0000 (GMT) Date: Thu, 23 Jan 2014 12:30:58 +0100 (CET) X-X-Sender: derick@whisky.home.derickrethans.nl To: Yasuo Ohgaki cc: Lars Strojny , Sara Golemon , PHP internals In-Reply-To: Message-ID: References: <2D2D996C-9455-4DD1-9669-90AFAF591E32@strojny.net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-398532961-1390476659=:6067" Subject: __set_state (Was: Re: [PHP-DEV] [RFC] __debug_info()) From: derick@php.net (Derick Rethans) --8323329-398532961-1390476659=:6067 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 23 Jan 2014, Yasuo Ohgaki wrote: > On Thu, Jan 23, 2014 at 3:35 AM, Derick Rethans wrote: >=20 > > > On Wed, Jan 22, 2014 at 6:37 AM, Lars Strojny wrot= e: > > > > > > > Love it, two things: the var_dump() properties will be replaced=20 > > > > (not merged) with the "real" properties in the object (I am=20 > > > > asking as that would make it very very cool for stuff like=20 > > > > doctrine, where lazy loaded entities are way too large to dump)?=20 > > > > As for the name, I would prefer __debugInfo() as in=20 > > > > __callStatic(). I know there is __set_state() but that's=20 > > > > something that needs deprecation and fixing :) > > > > > > Could anyone add __setState() for 5.6? > > > > Why would you want to do that? If at all, all the *newer* methods=20 > > should be __debug_info etc. __set_state was first and changing it to=20 > > __setState() would mean that var_export'ed() variables in < PHP 5.6=20 > > would now no longer work? Or the other way around? It's a cosmetic=20 > > change that helps nobody=E2=80=94just like renaming other standard func= tions=20 > > to make them more "organised". >=20 > I mean add alias for __set_state() to keep consistent names.=20 > __set_state() should be there very long time or forever for=20 > compatibility. You seem to misunderstand what __set_state() is for. It is for reliably=20 representing a value so that you can "include" it's contents with=20 var_export(). If 5.6 would suddenly start spitting out=20 Class::__setState() instead of Classs::__set_state() then older PHP=20 versions can't parse/include that outputted data anymore. > It's small cosmetic change, but it would assure PHP to be a good > language to learn in the future. IMHO. But it makes as much sense as adding a str_len() function as alias for=20 strlen() =E2=80=94 which really just adds more clutter. >=20 > Anyway, I would like to write RFC for aliasing. Aliases may be added > in the future. >=20 > Regards, >=20 > -- > Yasuo Ohgaki > yohgaki@ohgaki.net >=20 --=20 http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine --8323329-398532961-1390476659=:6067--