Re: Change debug_zval_dump to return the dump unaffected by __debugInfo?
| From: | Rowan Collins | Date: | Tue, 07 Feb 2017 13:37:59 +0000 |
| Subject: | Re: Change debug_zval_dump to return the dump unaffected by __debugInfo? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98243@lists.php.net to get a copy of this message | ||
On 7 February 2017 11:25:53 GMT+00:00, Wes <netmo.php@gmail.com> wrote:
>But even better, it would be nice if debug_zval_dump() always returned
>the
>debug information unaffected by custom user-defined __debugInfo. This
>is by
>the way what HHVM does: https://3v4l.org/OoJkC
While it might be a good idea to have a way of suppressing __debugInfo (I think this came up in the
RFC discussion when it was added?), I think debug_zval_dump should be deprecated and removed at this
point.
The main thing it claims to offer over the many other variable dumps is the refcount, but this has
never been reliable, and is now completely broken. The example in the manual recommends using
call-time pass-by-reference, which was removed in PHP 5.4; and in PHP 7 the nature of references has
changed so radically that it's not even clear what the correct output would be.
Regards,
--
Rowan Collins
[IMSoP]