Re: [RFC] __debug_info()
| From: | Ivan Enderlin @ Hoa | Date: | Wed, 22 Jan 2014 08:10:40 +0000 |
| Subject: | Re: [RFC] __debug_info() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71399@lists.php.net to get a copy of this message | ||
Hello :-),
On 21/01/2014 22:42, Frédéric Hardy wrote:
Hi all ! Le 21 janv. 2014 à 22:26, Sara Golemon <pollita@php.net> a écrit :Moreover, is this method able to throw an exception? Cheers. -- Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/Something new to argue about: https://wiki.php.net/rfc/debug-infoVery interesting feature (i have personally thinking about that several time in the past). However, i think that __dump() is a better name from the end user point of view. __debug_info() is a good name from the point of view of a C developer which works on the Zend Engine or on C extensions, but from the end user point of view, it’s not the case. And this new magical method is used internally by var_dump() so __dump() seems to me a better name. Maybe __set_dump() is an alternative too, because __set_state() is used internally by var_export(), but i’m not sure that it’s a better name than __dump which is very explicit and intuitive. +1 for__debugwhich is simpler than__debugInfo. The -info suffix does not add any relevant meaning about the method behavior.