#45989
| From: | till | Date: | Mon, 17 Nov 2008 15:38:40 +0000 |
| Subject: | #45989 | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-64526@lists.php.net to get a copy of this message | ||
Hey,
I ran into a couple inconsistencies in json_decode() today. I found
#45989[1] and noticed it had been bogus'd.
The docs suggest[2] that json_decode() returns NULL if invalid JSON is
fed into it and since the examples provided on the bug report all show
up as invalid on jsonlint[3], I figured I could give it a try and
write a test:
http://friendpaste.com/jvxjF7N8
It's rather trivial, let me know what you think.
Cheers,
Till
[1]: http://bugs.php.net/bug.php?id=45989
[2]: http://us.php.net/json_decode (see, Example #3)
[3]: http://jsonlint.com/