Re: [RFC] __debug_info()

From: Date: Wed, 22 Jan 2014 05:46:36 +0000
Subject: Re: [RFC] __debug_info()
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
hi,

On Tue, Jan 21, 2014 at 10:37 PM, Lars Strojny <[email protected]> wrote:
> Hi Sara,
>
> On 21 Jan 2014, at 22:26, Sara Golemon <[email protected]> wrote:
>
>> Something new to argue about:
>>
>> https://wiki.php.net/rfc/debug-info
>
> Love it, two things: the var_dump() properties will be replaced (not merged) with the
> "real" properties in the object (I am asking as that would make it very very cool for
> stuff like doctrine, where lazy loaded entities are way too large to dump)? As for the name, I would
> prefer __debugInfo() as in __callStatic(). I know there is __set_state() but that's something
> that needs deprecation and fixing :)

I can only second both statements. Love the idea (very useful!) and it
should indeed follow other "magic" method naming convention.

One additional comment, I am not sure about the manual merge of
properties. Maybe it should create an additional property called
"debugInfo" or something similar and store the result of __debugInfo
in it? It could be more user-friendly and less confusing.

Cheers,
-- 
Pierre

@pierrejoye | http://www.libgd.org


Thread (30 messages)

« previous php.internals (#71394) next »