Doc #73525 [Opn->Ver]: Not all JSON_ERROR_* constants are documented
| From: | cmb@php.net | Date: | Tue, 15 Nov 2016 11:41:18 +0000 |
| Subject: | Doc #73525 [Opn->Ver]: Not all JSON_ERROR_* constants are documented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14103@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: Open
+Status: Verified
Type: Documentation Problem
-Package: *General Issues
+Package: JSON related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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