{
const char *space;
const char *class_name = get_active_class_name(&space);
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "Wrong parameter count for %s%s%s()", class_name, space, get_active_function_name());
- zend_error(E_WARNING, "Wrong parameter count for %s%s%s()", class_name, space, get_active_function_name());
++ zend_error(error_type, "Wrong parameter count for %s%s%s()", class_name, space, get_active_function_name());
}
/* }}} */
{
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope ? active_function->common.scope->name->val : "";
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
- zend_error(E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
++ zend_error(error_type, "%s%s%s() expects %s %d parameter%s, %d given",
class_name, \
class_name[0] ? "::" : "", \
active_function->common.function_name->val,
Z_EXPECTED_TYPES(Z_EXPECTED_TYPE_STR)
NULL
};
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects parameter %d to be %s, %s given",
- zend_error(E_WARNING, "%s%s%s() expects parameter %d to be %s, %s given",
++ zend_error(error_type, "%s%s%s() expects parameter %d to be %s, %s given",
class_name, space, get_active_function_name(), num, expected_error[expected_type], zend_zval_type_name(arg));
}
/* }}} */
{
const char *space;
const char *class_name = get_active_class_name(&space);
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects parameter %d to be %s, %s given",
- zend_error(E_WARNING, "%s%s%s() expects parameter %d to be %s, %s given",
++ zend_error(error_type, "%s%s%s() expects parameter %d to be %s, %s given",
class_name, space, get_active_function_name(), num, name, zend_zval_type_name(arg));
}
/* }}} */
}
/* }}} */
-ZEND_API int zend_parse_arg_class(zval *arg, zend_class_entry **pce, int num, int check_null) /* {{{ */
+ZEND_API int zend_parse_arg_class(zval *arg, zend_class_entry **pce, int num, int check_null, zend_bool strict) /* {{{ */
{
zend_class_entry *ce_base = *pce;
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
if (check_null && Z_TYPE_P(arg) == IS_NULL) {
*pce = NULL;
const char *space;
const char *class_name = get_active_class_name(&space);
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects parameter %d to be a class name derived from %s, '%s' given",
- zend_error(E_WARNING, "%s%s%s() expects parameter %d to be a class name derived from %s, '%s' given",
++ zend_error(error_type, "%s%s%s() expects parameter %d to be a class name derived from %s, '%s' given",
class_name, space, get_active_function_name(), num,
ce_base->name->val, Z_STRVAL_P(arg));
*pce = NULL;
const char *space;
const char *class_name = get_active_class_name(&space);
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects parameter %d to be a valid class name, '%s' given",
- zend_error(E_WARNING, "%s%s%s() expects parameter %d to be a valid class name, '%s' given",
++ zend_error(error_type, "%s%s%s() expects parameter %d to be a valid class name, '%s' given",
class_name, space, get_active_function_name(), num,
Z_STRVAL_P(arg));
return 0;
break;
} else {
if (is_callable_error) {
- *severity = strict ? E_RECOVERABLE_ERROR : E_WARNING;
- *severity = E_WARNING;
++ *severity = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
zend_spprintf(error, 0, "to be a valid callback, %s", is_callable_error);
efree(is_callable_error);
return "";
{
const char *expected_type = NULL;
char *error = NULL;
- int severity = strict ? E_RECOVERABLE_ERROR : E_WARNING;
- int severity = E_WARNING;
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
++ int severity;
- expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity);
+ expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity, strict);
if (expected_type) {
if (!quiet && (*expected_type || error)) {
const char *space;
const char *class_name = get_active_class_name(&space);
if (error) {
-- zend_error(severity, "%s%s%s() expects parameter %d %s",
++ zend_error(error_type, "%s%s%s() expects parameter %d %s",
class_name, space, get_active_function_name(), arg_num, error);
efree(error);
} else {
-- zend_error(severity, "%s%s%s() expects parameter %d to be %s, %s given",
++ zend_error(error_type, "%s%s%s() expects parameter %d to be %s, %s given",
class_name, space, get_active_function_name(), arg_num, expected_type,
zend_zval_type_name(arg));
}
zend_bool have_varargs = 0;
zval **varargs = NULL;
int *n_varargs = NULL;
++ int error_type = strict ? (E_EXCEPTION | E_ERROR) : E_WARNING;
for (spec_walk = type_spec; *spec_walk; spec_walk++) {
c = *spec_walk;
if (!quiet) {
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope ? active_function->common.scope->name->val : "";
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s(): only one varargs specifier (* or +) is permitted",
- zend_error(E_WARNING, "%s%s%s(): only one varargs specifier (* or +) is permitted",
++
++ zend_error(error_type, "%s%s%s(): only one varargs specifier (* or +) is permitted",
class_name,
class_name[0] ? "::" : "",
active_function->common.function_name->val);
if (!quiet) {
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope ? active_function->common.scope->name->val : "";
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s(): bad type specifier while parsing parameters",
- zend_error(E_WARNING, "%s%s%s(): bad type specifier while parsing parameters",
++ zend_error(error_type, "%s%s%s(): bad type specifier while parsing parameters",
class_name,
class_name[0] ? "::" : "",
active_function->common.function_name->val);
if (!quiet) {
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope ? active_function->common.scope->name->val : "";
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
- zend_error(E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
++ zend_error(error_type, "%s%s%s() expects %s %d parameter%s, %d given",
class_name,
class_name[0] ? "::" : "",
active_function->common.function_name->val,
arg_count = ZEND_CALL_NUM_ARGS(EG(current_execute_data));
if (num_args > arg_count) {
- zend_error(strict ? E_RECOVERABLE_ERROR : E_WARNING, "%s(): could not obtain parameters for parsing",
- zend_error(E_WARNING, "%s(): could not obtain parameters for parsing",
++ zend_error(error_type, "%s(): could not obtain parameters for parsing",
get_active_function_name());
return FAILURE;
}
}
/* }}} */
-#define RETURN_IF_ZERO_ARGS(num_args, type_spec, quiet) { \
+#define RETURN_IF_ZERO_ARGS(num_args, type_spec, flags) { \
int __num_args = (num_args); \
\
- if (0 == (type_spec)[0] && 0 != __num_args && !(quiet)) { \
+ if (0 == (type_spec)[0] && 0 != __num_args && !(flags & ZEND_PARSE_PARAMS_QUIET)) { \
const char *__space; \
const char * __class_name = get_active_class_name(&__space); \
- zend_error((flags & ZEND_PARSE_PARAMS_STRICT) ? E_RECOVERABLE_ERROR : E_WARNING, "%s%s%s() expects exactly 0 parameters, %d given", \
- zend_error(E_WARNING, "%s%s%s() expects exactly 0 parameters, %d given", \
++ zend_error((flags & ZEND_PARSE_PARAMS_STRICT) ? (E_EXCEPTION | E_ERROR) : E_WARNING, "%s%s%s() expects exactly 0 parameters, %d given", \
__class_name, __space, \
get_active_function_name(), __num_args); \
return FAILURE; \
opline->op1.num = zend_vm_calc_used_stack(arg_count, fbc);
}
- call_flags = ((opline->opcode == ZEND_NEW) ? ZEND_CALL_CTOR : 0)
- call_flags = (opline->opcode == ZEND_NEW ? ZEND_CALL_CTOR : 0);
++ call_flags = (opline->opcode == ZEND_NEW ? ZEND_CALL_CTOR : 0)
+ | (CG(declarables).strict_types ? ZEND_CALL_STRICT_TYPEHINTS : 0);
- opline = zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL);
+ opline = zend_emit_op(result, zend_get_call_op(opline->opcode, fbc), NULL, NULL);
opline->op1.num = call_flags;
zend_do_extended_fcall_end();
#define EX_CALL_INFO() ZEND_CALL_INFO(execute_data)
#define EX_CALL_KIND() ZEND_CALL_KIND(execute_data)
#define EX_NUM_ARGS() ZEND_CALL_NUM_ARGS(execute_data)
++#define EX_USES_STRICT_TYPES() ((EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0)
#define EX_VAR(n) ZEND_CALL_VAR(execute_data, n)
#define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n)
}
} else if (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null) {
need_msg = zend_verify_internal_arg_class_kind((zend_internal_arg_info*)cur_arg_info, &class_name, &ce);
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "", arg);
}
} else if (cur_arg_info->type_hint) {
+ ZVAL_DEREF(arg);
if (cur_arg_info->type_hint == IS_ARRAY) {
- ZVAL_DEREF(arg);
if (Z_TYPE_P(arg) != IS_ARRAY && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type array", "", zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be of the type array", "", zend_zval_type_name(arg), "", arg);
}
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL) && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "", arg);
}
-#if ZEND_DEBUG
- } else {
- zend_error(E_ERROR, "Unknown typehint");
-#endif
+ } else if (UNEXPECTED(!ZEND_SAME_FAKE_TYPE(cur_arg_info->type_hint, Z_TYPE_P(arg)))) {
+ if (Z_TYPE_P(arg) == IS_NULL) {
+ if (!cur_arg_info->allow_null) {
+failure:
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "", arg);
++ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "", arg);
+ }
+ return;
+ }
+ if (!zend_verify_scalar_type_hint(cur_arg_info->type_hint, arg, strict)) {
+ goto failure;
+ }
}
}
}
}
} else if (Z_TYPE_P(arg) != IS_NULL || !(cur_arg_info->allow_null || (default_value && is_null_constant(default_value)))) {
need_msg = zend_verify_arg_class_kind(cur_arg_info, &class_name, &ce);
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "", arg);
}
} else if (cur_arg_info->type_hint) {
+ ZVAL_DEREF(arg);
if (cur_arg_info->type_hint == IS_ARRAY) {
- ZVAL_DEREF(arg);
if (Z_TYPE_P(arg) != IS_ARRAY && (Z_TYPE_P(arg) != IS_NULL || !(cur_arg_info->allow_null || (default_value && is_null_constant(default_value))))) {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type array", "", zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be of the type array", "", zend_zval_type_name(arg), "", arg);
}
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL) && (Z_TYPE_P(arg) != IS_NULL || !(cur_arg_info->allow_null || (default_value && is_null_constant(default_value))))) {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "", arg);
}
-#if ZEND_DEBUG
- } else {
- zend_error(E_ERROR, "Unknown typehint");
-#endif
+ } else if (UNEXPECTED(!ZEND_SAME_FAKE_TYPE(cur_arg_info->type_hint, Z_TYPE_P(arg)))) {
+ if (Z_TYPE_P(arg) == IS_NULL) {
+ if (!cur_arg_info->allow_null) {
+failure:
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "", arg);
++ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "", arg);
+ }
+ return;
+ }
+ if (!zend_verify_scalar_type_hint(cur_arg_info->type_hint, arg, strict)) {
+ goto failure;
+ }
}
}
}
return 0;
} else if (cur_arg_info->type_hint) {
if (cur_arg_info->type_hint == IS_ARRAY) {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type array", "", "none", "", NULL);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be of the type array", "", "none", "", NULL);
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", "none", "", NULL);
+ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be callable", "", "none", "", NULL);
-#if ZEND_DEBUG
} else {
- zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), "none", "", NULL);
- zend_error(E_ERROR, "Unknown typehint");
-#endif
++ zend_verify_arg_error(E_EXCEPTION | E_ERROR, zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), "none", "", NULL);
}
return 0;
}
}
#if ZEND_DEBUG
--static int zend_verify_internal_return_type(zend_function *zf, zval *ret)
++static int zend_verify_internal_return_type(zend_function *zf, zval *ret, zend_bool strict)
{
zend_arg_info *ret_info = zf->common.arg_info - 1;
char *need_msg;
zend_verify_return_error(E_CORE_ERROR, zf, "be callable", "", zend_zval_type_name(ret), "");
return 0;
}
--#if ZEND_DEBUG
-- } else {
-- zend_error(E_CORE_ERROR, "Unknown typehint");
-- return 0;
--#endif
++ } else if (UNEXPECTED(!ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(ret)))) {
++ if (Z_TYPE_P(ret) == IS_NULL) {
++ if (!ret_info->allow_null) {
++failure:
++ zend_verify_return_error(E_EXCEPTION | E_ERROR, zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), zend_zval_type_name(ret), "");
++ }
++ return 0;
++ }
++ if (!zend_verify_scalar_type_hint(ret_info->type_hint, ret, strict)) {
++ goto failure;
++ }
}
}
return 1;
}
} else if (ret_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(ret, IS_CALLABLE_CHECK_SILENT, NULL) && (Z_TYPE_P(ret) != IS_NULL || !ret_info->allow_null)) {
- zend_verify_return_error(E_RECOVERABLE_ERROR, zf, "be callable", "", zend_zval_type_name(ret), "");
+ zend_verify_return_error(E_EXCEPTION | E_ERROR, zf, "be callable", "", zend_zval_type_name(ret), "");
}
-#if ZEND_DEBUG
- } else {
- zend_error(E_ERROR, "Unknown typehint");
-#endif
+ } else if (UNEXPECTED(!ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(ret)))) {
+ if (Z_TYPE_P(ret) == IS_NULL) {
+ if (!ret_info->allow_null) {
+failure:
- zend_verify_return_error(E_RECOVERABLE_ERROR, zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), zend_zval_type_name(ret), "");
++ zend_verify_return_error(E_EXCEPTION | E_ERROR, zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), zend_zval_type_name(ret), "");
+ }
+ return;
+ }
+ if (!zend_verify_scalar_type_hint(ret_info->type_hint, ret, strict)) {
+ goto failure;
+ }
}
}
}
return 0;
} else if (ret_info->type_hint) {
if (ret_info->type_hint == IS_ARRAY) {
- zend_verify_return_error(E_RECOVERABLE_ERROR, zf, "be of the type array", "", "none", "");
+ zend_verify_return_error(E_EXCEPTION | E_ERROR, zf, "be of the type array", "", "none", "");
} else if (ret_info->type_hint == IS_CALLABLE) {
- zend_verify_return_error(E_RECOVERABLE_ERROR, zf, "be callable", "", "none", "");
+ zend_verify_return_error(E_EXCEPTION | E_ERROR, zf, "be callable", "", "none", "");
-#if ZEND_DEBUG
} else {
- zend_verify_return_error(E_RECOVERABLE_ERROR, zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), "none", "");
- zend_error(E_ERROR, "Unknown typehint");
-#endif
++ zend_verify_return_error(E_EXCEPTION | E_ERROR, zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), "none", "");
}
return 0;
}
object = NULL;
}
- EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
- func, opline->extended_value, called_scope, object, EX(call));
+ EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
+ func, opline->extended_value, called_scope, object, EX(call));
+
+ FREE_OP2();
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
+ {
+ USE_OPLINE
+ zval *func_name;
+ zval *func;
+ zend_function *fbc;
+
+ func_name = EX_CONSTANT(opline->op2) + 1;
+ if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ } else if ((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL) {
+ func_name++;
+ if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL)) {
+ SAVE_OPLINE();
+ zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ } else {
+ fbc = Z_FUNC_P(func);
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ }
+ } else {
+ fbc = Z_FUNC_P(func);
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ }
+
+ EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call));
+
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
+ {
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *fname = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval *func;
+ zend_function *fbc;
+
+ if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
+ } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(fname))) == NULL)) {
+ SAVE_OPLINE();
+ zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(fname));
+ HANDLE_EXCEPTION();
+ } else {
+ fbc = Z_FUNC_P(func);
+ CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
+ }
+
+ EX(call) = zend_vm_stack_push_call_frame_ex(
+ opline->op1.num, ZEND_CALL_NESTED_FUNCTION,
+ fbc, opline->extended_value, NULL, NULL, EX(call));
+
+ FREE_OP2();
+
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY)
+ {
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ call->called_scope = EX(called_scope);
+ Z_OBJ(call->This) = Z_OBJ(EX(This));
+
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
+
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
+
+ fbc->internal_function.handler(call, ret);
+
+ ZEND_ASSERT(
+ !call->func ||
+ !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
++ zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var), EX_USES_STRICT_TYPES()));
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+
+ if (!RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
+
+ ZEND_VM_INTERRUPT_CHECK();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ ZEND_VM_HANDLER(130, ZEND_DO_UCALL, ANY, ANY)
+ {
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ EG(scope) = NULL;
+ ret = NULL;
+ call->symbol_table = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = 0;
+ }
+
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
- FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_ENTER();
}
- ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
+ ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
{
USE_OPLINE
- zval *func_name;
- zval *func;
- zend_function *fbc;
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
- func_name = EX_CONSTANT(opline->op2) + 1;
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL) {
- func_name++;
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL)) {
- SAVE_OPLINE();
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
+ EG(scope) = NULL;
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zend_generator_create_zval(call, &fbc->op_array, EX_VAR(opline->result.var));
+ } else {
+ zend_vm_stack_free_args(call);
+ }
+
+ zend_vm_stack_free_call_frame(call);
} else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ ret = NULL;
+ call->symbol_table = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = 0;
+ }
+
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+
+ ZEND_VM_ENTER();
}
+ EG(scope) = EX(func)->op_array.scope;
} else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
- }
+ ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
- EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
- fbc, opline->extended_value, NULL, NULL, EX(call));
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
+ zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
+ fbc->common.scope ? fbc->common.scope->name->val : "",
+ fbc->common.scope ? "::" : "",
+ fbc->common.function_name->val);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
- ZEND_VM_NEXT_OPCODE();
- }
+ call->called_scope = EX(called_scope);
+ Z_OBJ(call->This) = Z_OBJ(EX(This));
- ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
- {
- USE_OPLINE
- zend_free_op free_op2;
- zval *fname = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval *func;
- zend_function *fbc;
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
- if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
- } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(fname))) == NULL)) {
- SAVE_OPLINE();
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(fname));
- } else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
- }
+ if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
+ uint32_t i;
+ uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
+ zval *p = ZEND_CALL_ARG(call, 1);
- EX(call) = zend_vm_stack_push_call_frame_ex(
- opline->op1.num, ZEND_CALL_NESTED_FUNCTION,
- fbc, opline->extended_value, NULL, NULL, EX(call));
+ for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
++ zend_verify_internal_arg_type(fbc, i + 1, p, EX_USES_STRICT_TYPES());
+ p++;
+ }
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+ zend_throw_exception_internal(NULL);
+ HANDLE_EXCEPTION();
+ }
+ }
- FREE_OP2();
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
+
+ fbc->internal_function.handler(call, ret);
+
+ ZEND_ASSERT(
+ !call->func ||
+ !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
++ zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var), EX_USES_STRICT_TYPES()));
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+
+ if (!RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ }
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
+ ZEND_VM_INTERRUPT_CHECK();
ZEND_VM_NEXT_OPCODE();
}
zval *p = ZEND_CALL_ARG(call, 1);
for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p, (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- p++;
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- zend_vm_stack_free_call_frame(call);
- if (RETURN_VALUE_USED(opline)) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
- if (UNEXPECTED(should_change_scope)) {
- ZEND_VM_C_GOTO(fcall_end_change_scope);
- } else {
- ZEND_VM_C_GOTO(fcall_end);
- zend_verify_internal_arg_type(fbc, i + 1, p);
++ zend_verify_internal_arg_type(fbc, i + 1, p, EX_USES_STRICT_TYPES());
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
+ }
+ if (UNEXPECTED(should_change_scope)) {
+ ZEND_VM_C_GOTO(fcall_end_change_scope);
+ } else {
+ ZEND_VM_C_GOTO(fcall_end);
+ }
}
+ p++;
}
}
ZEND_ASSERT(
!call->func ||
!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
-- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
++ zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var), EX_USES_STRICT_TYPES()));
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
} else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
- zend_verify_arg_type(EX(func), arg_num, param, NULL, (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- zend_verify_arg_type(EX(func), arg_num, param, NULL);
++ zend_verify_arg_type(EX(func), arg_num, param, NULL, EX_USES_STRICT_TYPES());
CHECK_EXCEPTION();
}
}
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
- zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2), (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2));
++ zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2), EX_USES_STRICT_TYPES());
}
CHECK_EXCEPTION();
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(params)) {
param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
- do {
- zend_verify_arg_type(EX(func), arg_num, param, NULL);
+ do {
- zend_verify_arg_type(EX(func), arg_num, param, NULL, (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
++ zend_verify_arg_type(EX(func), arg_num, param, NULL, EX_USES_STRICT_TYPES());
if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
ZEND_HASH_FILL_ADD(param);
param++;
ZEND_VM_CONTINUE();
}
- static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+ {
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ call->called_scope = EX(called_scope);
+ Z_OBJ(call->This) = Z_OBJ(EX(This));
+
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
+
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
+
+ fbc->internal_function.handler(call, ret);
+
+ ZEND_ASSERT(
+ !call->func ||
+ !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
++ zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var), EX_USES_STRICT_TYPES()));
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+
+ if (!RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
+
+ ZEND_VM_INTERRUPT_CHECK();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+ {
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ EG(scope) = NULL;
+ ret = NULL;
+ call->symbol_table = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = 0;
+ }
+
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+
+ ZEND_VM_ENTER();
+ }
+
+ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+ {
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
+ EG(scope) = NULL;
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zend_generator_create_zval(call, &fbc->op_array, EX_VAR(opline->result.var));
+ } else {
+ zend_vm_stack_free_args(call);
+ }
+
+ zend_vm_stack_free_call_frame(call);
+ } else {
+ ret = NULL;
+ call->symbol_table = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = 0;
+ }
+
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+
+ ZEND_VM_ENTER();
+ }
+ EG(scope) = EX(func)->op_array.scope;
+ } else {
+ ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
+
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
+ zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
+ fbc->common.scope ? fbc->common.scope->name->val : "",
+ fbc->common.scope ? "::" : "",
+ fbc->common.function_name->val);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+
+ call->called_scope = EX(called_scope);
+ Z_OBJ(call->This) = Z_OBJ(EX(This));
+
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
+
+ if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
+ uint32_t i;
+ uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
+ zval *p = ZEND_CALL_ARG(call, 1);
+
+ for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
++ zend_verify_internal_arg_type(fbc, i + 1, p, EX_USES_STRICT_TYPES());
+ p++;
+ }
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+ zend_throw_exception_internal(NULL);
+ HANDLE_EXCEPTION();
+ }
+ }
+
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
+
+ fbc->internal_function.handler(call, ret);
+
+ ZEND_ASSERT(
+ !call->func ||
+ !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
++ zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var), EX_USES_STRICT_TYPES()));
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+
+ if (!RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ }
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
+ ZEND_VM_INTERRUPT_CHECK();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_execute_data *call = EX(call);
zval *p = ZEND_CALL_ARG(call, 1);
for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p, (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- p++;
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- zend_vm_stack_free_call_frame(call);
- if (RETURN_VALUE_USED(opline)) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
- if (UNEXPECTED(should_change_scope)) {
- goto fcall_end_change_scope;
- } else {
- goto fcall_end;
- zend_verify_internal_arg_type(fbc, i + 1, p);
++ zend_verify_internal_arg_type(fbc, i + 1, p, EX_USES_STRICT_TYPES());
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
+ }
+ if (UNEXPECTED(should_change_scope)) {
+ goto fcall_end_change_scope;
+ } else {
+ goto fcall_end;
+ }
}
+ p++;
}
}
ZEND_ASSERT(
!call->func ||
!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
-- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
++ zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var), EX_USES_STRICT_TYPES()));
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
} else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
- zend_verify_arg_type(EX(func), arg_num, param, NULL, (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- zend_verify_arg_type(EX(func), arg_num, param, NULL);
++ zend_verify_arg_type(EX(func), arg_num, param, NULL, EX_USES_STRICT_TYPES());
CHECK_EXCEPTION();
}
param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
do {
- zend_verify_arg_type(EX(func), arg_num, param, NULL, (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- zend_verify_arg_type(EX(func), arg_num, param, NULL);
++ zend_verify_arg_type(EX(func), arg_num, param, NULL, EX_USES_STRICT_TYPES());
if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
ZEND_HASH_FILL_ADD(param);
param++;
}
if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
- zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2), (EX_CALL_INFO() & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0);
- zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2));
++ zend_verify_arg_type(EX(func), arg_num, param, EX_CONSTANT(opline->op2), EX_USES_STRICT_TYPES());
}
CHECK_EXCEPTION();