|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-11-26 20:25 UTC] papersnowman at gmail dot com
Description: ------------ --- From manual page: http://www.php.net/function.json-encode#refsect1-function.json- encode-returnvalues --- Documentation shows expected return value on success, but not failure. I would presume === false, but it is nice to be able to confirm. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
Not all types can encode. For example: Resource. php -r "var_dump(json_encode(fopen('/tmp/temp', 'w+')));" PHP Warning: json_encode(): type is unsupported, encoded as null in Command line code on line 1 string(4) "null" But, I agree that it anyway returns a string ("null" string)