|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Aug 21 07:00:02 2026 UTC |
Here's a much simpler test case based on the munged JSON from atsearch.autotrader.co.uk: <?php $input = '{"searchform":null}, null, {"searchresults":"foo"}'; var_dump(json_decode($input)); var_dump(json_last_error()); ?> Obviously json_last_error() should return something other than 0, presumably JSON_ERROR_SYNTAX (4), since it's not syntactically valid JSON.