summaryrefslogtreecommitdiff
path: root/ext/json
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-04-06 11:02:13 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-04-08 18:37:51 +0200
commit3709e74b5e495e210ada8039ed81fafa9cbadcdb (patch)
treeb7347572b1e22a2a27a45260b4f4773bf916b158 /ext/json
parentb0d8f012f95ba1f2d8dba238c93baf3afb73b78e (diff)
downloadphp-git-3709e74b5e495e210ada8039ed81fafa9cbadcdb.tar.gz
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Diffstat (limited to 'ext/json')
-rw-r--r--ext/json/json_arginfo.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/json/json_arginfo.h b/ext/json/json_arginfo.h
index cf06242135..9107e088e2 100644
--- a/ext/json/json_arginfo.h
+++ b/ext/json/json_arginfo.h
@@ -2,15 +2,15 @@
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, value)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
- ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, depth, IS_LONG, 0, "512")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_json_decode, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, json, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, assoc, _IS_BOOL, 1)
- ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, assoc, _IS_BOOL, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, depth, IS_LONG, 0, "512")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_json_last_error, 0, 0, IS_LONG, 0)