note 123929 deleted from function.json-decode by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 15:00:21 +0000 |
| Subject: | note 123929 deleted from function.json-decode by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215418@lists.php.net to get a copy of this message | ||
Note Submitter: adrian at abwegig dot net
----
Note that json_decode may return an array or object:
json_decode(json_encode(["A"]))
-> array(1) { [0]=> string(1) "A" }
json_decode(json_encode(["A"=>"B"]));
-> object(stdClass)#18 (1) { ["A"]=> string(1) "B" }