summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-12-22 16:44:39 +0300
committerDmitry Stogov <dmitry@zend.com>2014-12-22 16:44:39 +0300
commit2646f7bcb98dcdd322ea21701c8bb101104ea619 (patch)
tree6cfa66ba666378de3c59759079e17f3245af0281 /Zend/zend_API.c
parent2bc63e7b6d348e9210ec09facb4bedb6f4ab921a (diff)
downloadphp-git-2646f7bcb98dcdd322ea21701c8bb101104ea619.tar.gz
Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code.
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index f6fcd356f5..4f19e48033 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2206,6 +2206,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
if (ptr->arg_info[ptr->num_args].is_variadic) {
internal_function->fn_flags |= ZEND_ACC_VARIADIC;
+ /* Don't count the variadic argument */
+ internal_function->num_args--;
}
} else {
internal_function->arg_info = NULL;