Doc #73525 [Ver->Csd]: Not all JSON_ERROR_* constants are documented

From: Date: Tue, 15 Nov 2016 11:57:28 +0000
Subject: Doc #73525 [Ver->Csd]: Not all JSON_ERROR_* constants are documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14104@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73525&edit=1 ID: 73525 Updated by: cmb@php.net Reported by: mfischer@php.net Summary: Not all JSON_ERROR_* constants are documented -Status: Verified +Status: Closed Type: Documentation Problem Package: JSON related PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-11-15 11:56:38] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=341024 Log: Fix #73525: Not all JSON_ERROR_* constants are documented ------------------------------------------------------------------------ [2016-11-15 11:41:18] cmb@php.net Indeed, JSON_ERROR_INVALID_PROPERTY_NAME and JSON_ERROR_UTF16 have been introduced to fix bug #68546 and bug #62010, respectively, are available as of PHP 7.0.0 and not yet documented. ------------------------------------------------------------------------ [2016-11-15 09:40:22] mfischer@php.net Description: ------------ Looking at http://php.net/manual/en/function.json-last-error.php , right now the following constants are documented: JSON_ERROR_NONE JSON_ERROR_DEPTH JSON_ERROR_STATE_MISMATCH JSON_ERROR_CTRL_CHAR JSON_ERROR_SYNTAX JSON_ERROR_UTF8 JSON_ERROR_RECURSION JSON_ERROR_INF_OR_NAN JSON_ERROR_UNSUPPORTED_TYPE Using PHP 7.0.12 (sorry, don't have 7.0.13 which was already released) I see two more (at the end): $ php -r 'var_dump(get_defined_constants());' | grep JSON_ERROR_ ["JSON_ERROR_NONE"]=> ["JSON_ERROR_DEPTH"]=> ["JSON_ERROR_STATE_MISMATCH"]=> ["JSON_ERROR_CTRL_CHAR"]=> ["JSON_ERROR_SYNTAX"]=> ["JSON_ERROR_UTF8"]=> ["JSON_ERROR_RECURSION"]=> ["JSON_ERROR_INF_OR_NAN"]=> ["JSON_ERROR_UNSUPPORTED_TYPE"]=> ["JSON_ERROR_INVALID_PROPERTY_NAME"]=> ["JSON_ERROR_UTF16"]=> Testing with https://3v4l.org/niJ9G it seems there are now constants introduced with PHP7 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73525&edit=1

« previous php.doc.bugs (#14104) next »