#41271 [NEW]: missing proto declarations for the json extension

From: Date: Thu, 03 May 2007 18:52:51 +0000
Subject: #41271 [NEW]: missing proto declarations for the json extension
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969376245@lists.php.net to get a copy of this message
From: jeffg at activestate dot com Operating system: OS X PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: missing proto declarations for the json extension 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; -- Edit bug report at http://bugs.php.net/?id=41271&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41271&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41271&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41271&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41271&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41271&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41271&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41271&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41271&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41271&r=support Expected behavior: http://bugs.php.net/fix.php?id=41271&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41271&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41271&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41271&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41271&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41271&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41271&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41271&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41271&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41271&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41271&r=mysqlcfg

« previous php.doc (#969376245) next »