|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-14 10:24 UTC] b dot bendeliani at gmail dot com
-Summary: json_decode now working correctly.
+Summary: json_decode not working correctly.
[2016-05-14 10:24 UTC] b dot bendeliani at gmail dot com
[2016-05-15 15:09 UTC] bukka@php.net
-Package: json
+Package: JSON related
[2016-05-15 15:19 UTC] bukka@php.net
-Status: Open
+Status: Duplicate
[2016-05-15 15:19 UTC] bukka@php.net
[2016-05-15 15:20 UTC] bukka@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 11:00:01 2025 UTC |
Description: ------------ I'm had this script in older version of php and there was not any error. When I upgraded to PHP 7.0.6 this problem occurred. Test script: --------------- class Json implements JsonSerializable { public function jsonSerialize() { json_decode(""); return ["test" => "test"]; } } $test = new Json; header('Content-Type: application/json'); echo json_encode($test); Expected result: ---------------- {"test":"test"} Actual result: -------------- ""