I saw PHP 5.6 now create the new magic method, called __debugInfo
.
This method is intended to return a array
, so it will be printed on the var_dump
call. This array
returned obviously should provide debugging information for the class.
I would like to understand in what cases this would be useful?
Was not the traditional% by itself enough enough? Was this done just to solve circular reference problems?