|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-06-14 16:48 UTC] tim dot d dot whitney at gmail dot com
Description: ------------ --- From manual page: https://php.net/function.json-decode --- >>> json_decode('"{\"test\": 123}"', TRUE); => "{"test": 123}" The documentation does not mention that a string could be returned. Test script: --------------- >>> json_decode('"{\"test\": 123}"', TRUE); => "{"test": 123}" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
I don't think it needs to do that, as string is the "appropriate PHP type." sometimes. var_dump(json_decode(json_encode('"{\"test\": 123}"'), TRUE)); If you want to propose some better wording, please do so at: https://github.com/php/doc-en/blob/master/reference/json/functions/json-decode.xml