Hi all !
Le 21 janv. 2014 à 22:26, Sara Golemon <
[email protected]> a écrit :
Very 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
__debug
which is simpler than
__debugInfo
. The -info suffix does not add any relevant meaning about the method behavior.
Moreover, is this method able to throw an exception?
Cheers.