Re: Inconsistent json_decode() results
| From: | Michael Shadle | Date: | Wed, 05 May 2010 20:14:27 +0000 |
| Subject: | Re: Inconsistent json_decode() results | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-304923@lists.php.net to get a copy of this message | ||
On Wed, May 5, 2010 at 1:11 PM, Michiel Sikma <michiel@thingmajig.org> wrote:
> You're right, but this is about how 5.2.10 ignores the second parameter and
> always returns a class, which appears to be a bug. I'm not sure which other
> versions have this same problem, but 5.2.11 has correct behavior, which
> seems to suggest they found and fixed it by then. I can't find an entry for
> this problem in PHP's bug database, however.
> My suggestion to typecast the result of json_decode() should only be
> followed if you need an array and are required to work with version 5.2.10.
Ahhhh. I gotcha now. Yeah I started using that just recently either
5.2.11 or 5.2.13 (not sure which)
You can typecast an object to an array that easily? I was unaware.