Re: [RFC] __debug_info()
| From: | Sara Golemon | Date: | Tue, 21 Jan 2014 21:41:32 +0000 |
| Subject: | Re: [RFC] __debug_info() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71383@lists.php.net to get a copy of this message | ||
On Tue, Jan 21, 2014 at 1:37 PM, Lars Strojny <lars@strojny.net> wrote:
> On 21 Jan 2014, at 22:26, Sara Golemon <pollita@php.net> wrote:
>> 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 :)
>
Replaced. The idea being that if you want to merge with the base
props, you can return (array)$this + ['other'=>'props']; or similar.
EXCELLENT point on the method naming, I'll put that version 1.1 of the RFC.
-Sara