Re: Making stdClass iterable

From: Date: Mon, 14 Jan 2019 15:17:52 +0000
Subject: Re: Making stdClass iterable
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-103736@lists.php.net to get a copy of this message
On Mon, Jan 14, 2019 at 4:09 PM Benjamin Morel <benjamin.morel@gmail.com> wrote: > > We should never have added stdClass. > > Why not deprecate it then, instead of extending it and giving it more > legitimacy? > This would remove some of the "2 ways of doing the same thing", such as > json_decode(). > > Ben > This. stdClass can't die due to a lot of backwards compatibility in existing code (wordpress loves it), but in any code I've written over the past 5 years, the first thing I'd do with it is get rid of it as fast as possible. Making it more powerful will just make the problem bigger. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#103736) next »