j. compare_objects() and compare() object handlers
k. The 'I' length modifier
l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR
+ m. All internal functions must have arginfo
2. Build system changes
a. Abstract
pre increments/decrements (ZEND_PRE_INC, ZEND_PRE_DEC, ZEND_PRE_INC_OBJ
ZEND_PRE_DEC_OBJ, ZEND_PRE_INC_STATIC_PROP ZEND_PRE_DEC_STATIC_PROP).
+ m. All internal functions and methods are now required to specify arginfo
+ information, otherwise warnings will be thrown on startup.
+
========================
2. Build system changes
========================
} else {
internal_function->fn_flags = ZEND_ACC_PUBLIC;
}
+
if (ptr->arg_info) {
zend_internal_function_info *info = (zend_internal_function_info*)ptr->arg_info;
-
internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1;
internal_function->num_args = ptr->num_args;
/* Currently you cannot denote that the function can accept less arguments than num_args */
internal_function->fn_flags |= ZEND_ACC_HAS_RETURN_TYPE;
}
} else {
+ zend_error(E_CORE_WARNING, "Missing arginfo for %s%s%s()",
+ scope ? ZSTR_VAL(scope->name) : "", scope ? "::" : "", ptr->fname);
+
internal_function->arg_info = NULL;
internal_function->num_args = 0;
internal_function->required_num_args = 0;
}
+
zend_set_function_arg_flags((zend_function*)internal_function);
if (ptr->flags & ZEND_ACC_ABSTRACT) {
if (scope) {
inheritance_status status, local_status;
zend_bool proto_is_variadic, fe_is_variadic;
- /* If it's a user function then arg_info == NULL means we don't have any parameters but
- * we still need to do the arg number checks. We are only willing to ignore this for internal
- * functions because extensions don't always define arg_info.
- */
- if (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION) {
- return INHERITANCE_SUCCESS;
- }
-
/* Checks for constructors only if they are declared in an interface,
* or explicitly marked as abstract
*/