note 109679 deleted from function.json-decode by danbrown

From: Date: Fri, 10 Aug 2012 16:07:44 +0000
Subject: note 109679 deleted from function.json-decode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189994@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- @geoffrey's example below is invalid. Don't forget that json_decode decodes *json*. So, json_decode("01234") tells the decoder to produce an integer. That has nothing to do with PHP - the JSON string "01234" *is* a JSON representation of an integer. Since Geoffrey intended the result to be a string, he should have had the JSON representation of a string to begin with. Ie json_decode('"01234"').

« previous php.notes (#189994) next »