summaryrefslogtreecommitdiff
path: root/ext/opcache/ZendAccelerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/ZendAccelerator.c')
-rw-r--r--ext/opcache/ZendAccelerator.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 8be645be65..634e1151aa 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -537,6 +537,22 @@ static void accel_use_shm_interned_strings(void)
if (Z_FUNC(p->val)->common.function_name) {
Z_FUNC(p->val)->common.function_name = accel_new_interned_string(Z_FUNC(p->val)->common.function_name);
}
+ if (Z_FUNC(p->val)->common.arg_info &&
+ (Z_FUNC(p->val)->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) {
+ uint32_t i;
+ uint32_t num_args = Z_FUNC(p->val)->common.num_args + 1;
+ zend_arg_info *arg_info = Z_FUNC(p->val)->common.arg_info - 1;
+
+ if (Z_FUNC(p->val)->common.fn_flags & ZEND_ACC_VARIADIC) {
+ num_args++;
+ }
+ for (i = 0 ; i < num_args; i++) {
+ if (ZEND_TYPE_IS_CLASS(arg_info[i].type)) {
+ zend_bool allow_null = ZEND_TYPE_ALLOW_NULL(arg_info[i].type);
+ arg_info[i].type = ZEND_TYPE_ENCODE_CLASS(accel_new_interned_string(ZEND_TYPE_NAME(arg_info[i].type)), allow_null);
+ }
+ }
+ }
}
/* class table hash keys, class names, properties, methods, constants, etc */