Re: [RFC] [VOTE] __debugInfo()
| From: | George Bond | Date: | Tue, 11 Feb 2014 19:03:09 +0000 |
| Subject: | Re: [RFC] [VOTE] __debugInfo() | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72466@lists.php.net to get a copy of this message | ||
On 11 February 2014 18:29, Crypto Compress <cryptocompress@googlemail.com>wrote:
> Imagine a proxy object (orm).
>
> Usecase #1: end-user
> Sees only proxied object. No cluttered object graph. Very useful!
>
> Usecase #2: new maintainer
> Hunting bug in proxy object. No way to dump internals at all. Wait what?
>
Solution:
1: Search for "__debugInfo" in project
2: Comment out function
3: Squash bug
4: Revert library code
If you're bug hunting with var_dump(), you are not adverse to temporarily
hacking at source code to add debug statements at weird places. You're
probably also hacking out all your normal exception handling and output
formatting to get the dump to display on screen. So why wouldn't you be
prepared to hack this too?
--G