|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-25 13:25 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 16:00:01 2025 UTC |
Description: ------------ The json extension is missing proto doc strings for json_encode() and json_decode(), which causes source scanning scripts looking for these signatures to miss these two functions ( eg Rasmus' script ). A minor issue, but it would be nice if the json sources were more standardized. Here is a diff, using today's snap: --- php5.2-200705031830/ext/json/json.c 2007-04-13 15:31:12.000000000 -0700 +++ php5.2-snaps-altered/ext/json/json.c 2007-05-03 11:44:57.000000000 -0700 @@ -387,6 +387,9 @@ return; } +/* {{{ proto string json_encode(mixed $value) + Returns a string containing the JSON representation of value. */ + static PHP_FUNCTION(json_encode) { zval *parameter; @@ -403,6 +406,9 @@ smart_str_free(&buf); } +/* {{{ proto string json_decode(string $json [bool $assoc]) + Takes a JSON encoded string and converts it into a PHP variable. */ + static PHP_FUNCTION(json_decode) { char *parameter;