Download src/php/php-src/ext/json/php_json.h from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 4.21 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/php_json.h
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/php_json.h
-
curl -L -o php_json.h https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/php_json.h
4.21 kB
| /* | |
| +----------------------------------------------------------------------+ | |
| | Copyright (c) The PHP Group | | |
| +----------------------------------------------------------------------+ | |
| | This source file is subject to version 3.01 of the PHP license, | | |
| | that is bundled with this package in the file LICENSE, and is | | |
| | available through the world-wide-web at the following url: | | |
| | https://www.php.net/license/3_01.txt | | |
| | If you did not receive a copy of the PHP license and are unable to | | |
| | obtain it through the world-wide-web, please send a note to | | |
| | license@php.net so we can mail you a copy immediately. | | |
| +----------------------------------------------------------------------+ | |
| | Author: Omar Kilani <omar@php.net> | | |
| | Jakub Zelenka <bukka@php.net> | | |
| +----------------------------------------------------------------------+ | |
| */ | |
| extern zend_module_entry json_module_entry; | |
| extern PHP_JSON_API zend_class_entry *php_json_serializable_ce; | |
| /* error codes */ | |
| typedef enum { | |
| PHP_JSON_ERROR_NONE = 0, | |
| PHP_JSON_ERROR_DEPTH, | |
| PHP_JSON_ERROR_STATE_MISMATCH, | |
| PHP_JSON_ERROR_CTRL_CHAR, | |
| PHP_JSON_ERROR_SYNTAX, | |
| PHP_JSON_ERROR_UTF8, | |
| PHP_JSON_ERROR_RECURSION, | |
| PHP_JSON_ERROR_INF_OR_NAN, | |
| PHP_JSON_ERROR_UNSUPPORTED_TYPE, | |
| PHP_JSON_ERROR_INVALID_PROPERTY_NAME, | |
| PHP_JSON_ERROR_UTF16, | |
| PHP_JSON_ERROR_NON_BACKED_ENUM, | |
| } php_json_error_code; | |
| /* json_decode() options */ | |
| /* json_encode() options */ | |
| /* json_validate(), json_decode() and json_encode() common options */ | |
| /* json_decode() and json_encode() common options */ | |
| /* Internal flags */ | |
| /* default depth */ | |
| ZEND_BEGIN_MODULE_GLOBALS(json) | |
| int encoder_depth; | |
| int encode_max_depth; | |
| php_json_error_code error_code; | |
| ZEND_END_MODULE_GLOBALS(json) | |
| PHP_JSON_API ZEND_EXTERN_MODULE_GLOBALS(json) | |
| ZEND_TSRMLS_CACHE_EXTERN() | |
| PHP_JSON_API zend_string *php_json_encode_string(const char *s, size_t len, int options); | |
| PHP_JSON_API zend_result php_json_encode_ex(smart_str *buf, zval *val, int options, zend_long depth); | |
| PHP_JSON_API zend_result php_json_encode(smart_str *buf, zval *val, int options); | |
| PHP_JSON_API zend_result php_json_decode_ex(zval *return_value, const char *str, size_t str_len, zend_long options, zend_long depth); | |
| PHP_JSON_API bool php_json_validate_ex(const char *str, size_t str_len, zend_long options, zend_long depth); | |
| static inline zend_result php_json_decode(zval *return_value, const char *str, size_t str_len, bool assoc, zend_long depth) | |
| { | |
| return php_json_decode_ex(return_value, str, str_len, assoc ? PHP_JSON_OBJECT_AS_ARRAY : 0, depth); | |
| } | |