Expose new constant for JSON_ERROR_NON_BACKED_ENUM
Description
When a non-backed enum is part of the data given to json_encode(), an integer error code (11) will be generated that is not currently available via JSON_ERROR_* constants. This error code seems to be internally recognized and supported (e.g. has a message) within PHP:
https://github.com/php/php-src/blob/ec53e17adf4f1669411334750a1d47954e2bc8e3/ext/json/json.c#L190-L191
However, it seems that a public constant is not available as it is not currently included in the list of defined constants: https://github.com/php/php-src/blob/ec53e17adf4f1669411334750a1d47954e2bc8e3/ext/json/json.c#L74-L85
My "feature request" is simply that this constant (JSON_ERROR_NON_BACKED_ENUM?) be added so we do not have to rely on the integer 11 to handle this error case.
--
Side note, it seems the 11 code is simply a result of that internal PHP_JSON_ERROR_NON_BACKED_ENUM being the 12th item (thus 11 index) in this enum list:
https://github.com/php/php-src/blob/ec53e17adf4f1669411334750a1d47954e2bc8e3/ext/json/php_json.h#L42-L56
This is an oversight, and I'd be ok labeling this as a bug.