Re: [RFC] [VOTE] __debugInfo()

From: Date: Mon, 03 Feb 2014 21:08:02 +0000
Subject: Re: [RFC] [VOTE] __debugInfo()
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-72121@lists.php.net to get a copy of this message
Hi Crypto, On Tue, Feb 4, 2014 at 6:03 AM, Crypto Compress < cryptocompress@googlemail.com> wrote: > This is a somewhat unexpected BC break in a point release. Why no 6.0 > option? > class Dog { public function __debugInfo() { return ['Cat']; } } > var_dump(new Dog); // Array { "Cat" } > > Name is a bit ambiguous. This method does not debug anything as in xdebug > or phpdbg. It exposes internal "__state". > __someMethod() is reserved name for internal use and it is explicitly documented. If it breaks, it's users fault. We cannot cover all of user faults... Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#72121) next »