diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 2fa3a8d80d4..2608c3cd62e 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -6,6 +6,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES c. TSRM changes d. get() and set() object handlers e. zend_parse_parameters 'L' specifier + f. Arginfo argument types 2. Build system changes a. Abstract @@ -52,6 +53,10 @@ PHP 8.0 INTERNALS UPGRADE NOTES family of macros have been removed. Use 'l' and Z_PARAM_LONG() instead, which, despite the confusing name, actually have stricter input validation. + f. Arginfo argument types for internal functions are no longer checked. + Instead type checks should be performed using the zend_parse_parameters() + or ZEND_PARSE_PARAMETERS_*() APIs. + ======================== 2. Build system changes ======================== diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 06baae76e45..7a57a2c403d 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -888,6 +888,34 @@ static zend_bool zend_verify_weak_scalar_type_hint(zend_uchar type_hint, zval *a } } +#if ZEND_DEBUG +/* Used to sanity-check internal arginfo types without performing any actual type conversions. */ +static zend_bool zend_verify_weak_scalar_type_hint_no_sideeffect(zend_uchar type_hint, zval *arg) +{ + switch (type_hint) { + case _IS_BOOL: { + zend_bool dest; + return zend_parse_arg_bool_weak(arg, &dest); + } + case IS_LONG: { + zend_long dest; + return zend_parse_arg_long_weak(arg, &dest); + } + case IS_DOUBLE: { + double dest; + return zend_parse_arg_double_weak(arg, &dest); + } + case IS_STRING: + /* We don't call cast_object here, because this check must be side-effect free. As this + * is only used for a sanity check of arginfo/zpp consistency, it's okay if we accept + * more than actually allowed here. */ + return Z_TYPE_P(arg) < IS_STRING || Z_TYPE_P(arg) == IS_OBJECT; + default: + return 0; + } +} +#endif + static zend_bool zend_verify_scalar_type_hint(zend_uchar type_hint, zval *arg, zend_bool strict, zend_bool is_internal_arg) { if (UNEXPECTED(strict)) { @@ -903,6 +931,11 @@ static zend_bool zend_verify_scalar_type_hint(zend_uchar type_hint, zval *arg, z } return 0; } +#if ZEND_DEBUG + if (is_internal_arg) { + return zend_verify_weak_scalar_type_hint_no_sideeffect(type_hint, arg); + } +#endif return zend_verify_weak_scalar_type_hint(type_hint, arg); } @@ -1083,7 +1116,7 @@ static zend_always_inline zend_bool zend_check_type( * because this case is already checked at compile-time. */ } -static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot, zend_bool is_internal) +static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot) { zend_arg_info *cur_arg_info; zend_class_entry *ce; @@ -1097,7 +1130,7 @@ static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t a } ce = NULL; - if (UNEXPECTED(!zend_check_type(cur_arg_info->type, arg, &ce, cache_slot, default_value, zf->common.scope, 0, is_internal))) { + if (UNEXPECTED(!zend_check_type(cur_arg_info->type, arg, &ce, cache_slot, default_value, zf->common.scope, 0, 0))) { zend_verify_arg_error(zf, cur_arg_info, arg_num, ce, arg); return 0; } @@ -1140,21 +1173,29 @@ static zend_always_inline int zend_verify_variadic_arg_type(zend_function *zf, u return 1; } -static zend_never_inline int zend_verify_internal_arg_types(zend_function *fbc, zend_execute_data *call) +static zend_never_inline ZEND_ATTRIBUTE_UNUSED int zend_verify_internal_arg_types(zend_function *fbc, zend_execute_data *call) { uint32_t i; uint32_t num_args = ZEND_CALL_NUM_ARGS(call); - zval *p = ZEND_CALL_ARG(call, 1); - void *dummy_cache_slot; + zval *arg = ZEND_CALL_ARG(call, 1); for (i = 0; i < num_args; ++i) { - dummy_cache_slot = NULL; - if (UNEXPECTED(!zend_verify_arg_type(fbc, i + 1, p, NULL, &dummy_cache_slot, 1))) { - EG(current_execute_data) = call->prev_execute_data; - zend_vm_stack_free_args(call); + zend_arg_info *cur_arg_info; + zend_class_entry *ce = NULL; + void *dummy_cache_slot = NULL; + + if (EXPECTED(i < fbc->common.num_args)) { + cur_arg_info = &fbc->common.arg_info[i]; + } else if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_VARIADIC)) { + cur_arg_info = &fbc->common.arg_info[fbc->common.num_args]; + } else { + break; + } + + if (UNEXPECTED(!zend_check_type(cur_arg_info->type, arg, &ce, &dummy_cache_slot, NULL, fbc->common.scope, 0, /* is_internal_arg */ 1))) { return 0; } - p++; + arg++; } return 1; } @@ -4444,14 +4485,7 @@ ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode return ret; } -ZEND_API void ZEND_FASTCALL zend_check_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg) -{ - void *dummy_cache_slot = NULL; - - zend_verify_arg_type(zf, arg_num, arg, NULL, &dummy_cache_slot, 1); -} - ZEND_API int ZEND_FASTCALL zend_check_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot) { - return zend_verify_arg_type(zf, arg_num, arg, default_value, cache_slot, 0); + return zend_verify_arg_type(zf, arg_num, arg, default_value, cache_slot); } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 6ef9baf2527..a77a909533b 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -52,7 +52,6 @@ ZEND_API int zend_eval_stringl_ex(const char *str, size_t str_len, zval *retval_ /* export zend_pass_function to allow comparisons against it */ extern ZEND_API const zend_internal_function zend_pass_function; -ZEND_API void ZEND_FASTCALL zend_check_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg); ZEND_API int ZEND_FASTCALL zend_check_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_missing_arg_error(zend_execute_data *execute_data); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index d3052cf706e..41c33be0df3 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3954,13 +3954,15 @@ ZEND_VM_HOT_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL)) call->prev_execute_data = execute_data; EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - zend_vm_stack_free_call_frame(call); - zend_rethrow_exception(execute_data); - UNDEF_RESULT(); - HANDLE_EXCEPTION(); - } + +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; ZVAL_NULL(ret); @@ -3969,6 +3971,7 @@ ZEND_VM_HOT_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL)) #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -4040,11 +4043,14 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL)) call->prev_execute_data = execute_data; EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - UNDEF_RESULT(); - ZEND_VM_C_GOTO(fcall_end); - } +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval; ZVAL_NULL(ret); @@ -4058,6 +4064,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL)) #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -4073,7 +4080,6 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL)) } } -ZEND_VM_C_LABEL(fcall_end): if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) { OBJ_RELEASE(Z_OBJ(call->This)); } @@ -8108,14 +8114,14 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY) EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - zend_vm_stack_free_call_frame(call); - if (ret) { - ZVAL_UNDEF(ret); - } - ZEND_VM_C_GOTO(call_trampoline_end); - } +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif if (ret == NULL) { ZVAL_NULL(&retval); @@ -8131,6 +8137,7 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY) #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -8147,7 +8154,6 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY) } } -ZEND_VM_C_LABEL(call_trampoline_end): execute_data = EG(current_execute_data); if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 4b09ac05a39..7a31d2685eb 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1129,13 +1129,15 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S call->prev_execute_data = execute_data; EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - zend_vm_stack_free_call_frame(call); - zend_rethrow_exception(execute_data); - UNDEF_RESULT(); - HANDLE_EXCEPTION(); - } + +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif ret = 0 ? EX_VAR(opline->result.var) : &retval; ZVAL_NULL(ret); @@ -1144,6 +1146,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -1205,13 +1208,15 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S call->prev_execute_data = execute_data; EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - zend_vm_stack_free_call_frame(call); - zend_rethrow_exception(execute_data); - UNDEF_RESULT(); - HANDLE_EXCEPTION(); - } + +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif ret = 1 ? EX_VAR(opline->result.var) : &retval; ZVAL_NULL(ret); @@ -1220,6 +1225,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -1291,11 +1297,14 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV call->prev_execute_data = execute_data; EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - UNDEF_RESULT(); - goto fcall_end; - } +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif ret = 0 ? EX_VAR(opline->result.var) : &retval; ZVAL_NULL(ret); @@ -1309,6 +1318,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -1324,7 +1334,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV } } -fcall_end: if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) { OBJ_RELEASE(Z_OBJ(call->This)); } @@ -1386,11 +1395,14 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV call->prev_execute_data = execute_data; EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - UNDEF_RESULT(); - goto fcall_end; - } +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif ret = 1 ? EX_VAR(opline->result.var) : &retval; ZVAL_NULL(ret); @@ -1404,6 +1416,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -1419,7 +1432,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV } } -fcall_end: if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) { OBJ_RELEASE(Z_OBJ(call->This)); } @@ -2418,14 +2430,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z EG(current_execute_data) = call; - if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) { - zend_vm_stack_free_call_frame(call); - if (ret) { - ZVAL_UNDEF(ret); - } - goto call_trampoline_end; - } +#if ZEND_DEBUG + /* Type checks for internal functions are usually only performed by zpp. + * In debug mode we additionally run arginfo checks to detect cases where + * arginfo and zpp went out of sync. */ + zend_bool wrong_arg_types = + (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) && + !zend_verify_internal_arg_types(fbc, call); +#endif if (ret == NULL) { ZVAL_NULL(&retval); @@ -2441,6 +2453,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z #if ZEND_DEBUG if (!EG(exception) && call->func) { + ZEND_ASSERT(!wrong_arg_types && "Arginfo / zpp type mismatch?"); ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, ret)); ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) @@ -2457,7 +2470,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z } } -call_trampoline_end: execute_data = EG(current_execute_data); if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) { diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt index 5c1c061e756..f57f3e4b1d8 100644 --- a/ext/date/tests/014.phpt +++ b/ext/date/tests/014.phpt @@ -33,7 +33,7 @@ object(DateTimeZone)#%d (2) { } int(0) -Fatal error: Uncaught TypeError: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d +Fatal error: Uncaught TypeError: timezone_offset_get() expects parameter 1 to be DateTimeZone, object given in %s:%d Stack trace: #0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone)) #1 {main} diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt index f77836c8ef8..89687db4f2f 100644 --- a/ext/date/tests/timezone_offset_get_error.phpt +++ b/ext/date/tests/timezone_offset_get_error.phpt @@ -62,22 +62,22 @@ try { } ?> ===DONE=== ---EXPECTF-- +--EXPECT-- *** Testing timezone_offset_get() : error conditions *** -- Testing timezone_offset_get() function with an invalid values for $object argument -- -string(%d) "Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of stdClass given" +string(74) "timezone_offset_get() expects parameter 1 to be DateTimeZone, object given" -string(%d) "Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given" +string(71) "timezone_offset_get() expects parameter 1 to be DateTimeZone, int given" -string(%d) "Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given" +string(72) "timezone_offset_get() expects parameter 1 to be DateTimeZone, null given" -- Testing timezone_offset_get() function with an invalid values for $datetime argument -- -string(%d) "Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, instance of stdClass given" +string(79) "timezone_offset_get() expects parameter 2 to be DateTimeInterface, object given" -string(%d) "Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given" +string(76) "timezone_offset_get() expects parameter 2 to be DateTimeInterface, int given" -string(%d) "Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given" +string(77) "timezone_offset_get() expects parameter 2 to be DateTimeInterface, null given" ===DONE=== diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt index 1fc12828e13..f0fd43558eb 100644 --- a/ext/intl/tests/calendar_add_error.phpt +++ b/ext/intl/tests/calendar_add_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_add(1, 2, 3)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_add() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_add(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt index 805f0648417..4d34ae77f5d 100644 --- a/ext/intl/tests/calendar_before_after_error.phpt +++ b/ext/intl/tests/calendar_before_after_error.phpt @@ -65,9 +65,9 @@ error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given -error: 0, Argument 1 passed to IntlCalendar::after() must be an instance of IntlCalendar, int given +error: 0, IntlCalendar::after() expects parameter 1 to be IntlCalendar, int given -error: 0, Argument 1 passed to IntlCalendar::before() must be an instance of IntlCalendar, int given +error: 0, IntlCalendar::before() expects parameter 1 to be IntlCalendar, int given error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt index e91b7a6326a..7fec27399e3 100644 --- a/ext/intl/tests/calendar_clear_error.phpt +++ b/ext/intl/tests/calendar_clear_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_clear() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_clear(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt index d716c1a698d..4e6f40b43d4 100644 --- a/ext/intl/tests/calendar_equals_error.phpt +++ b/ext/intl/tests/calendar_equals_error.phpt @@ -47,10 +47,10 @@ try { --EXPECT-- error: 0, IntlCalendar::equals() expects exactly 1 parameter, 0 given -error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given +error: 0, IntlCalendar::equals() expects parameter 1 to be IntlCalendar, object given -error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, int given +error: 0, IntlCalendar::equals() expects exactly 1 parameter, 2 given -error: 0, Argument 2 passed to intlcal_equals() must be an instance of IntlCalendar, array given +error: 0, intlcal_equals() expects parameter 2 to be IntlCalendar, array given -error: 0, Argument 1 passed to intlcal_equals() must be an instance of IntlCalendar, int given +error: 0, intlcal_equals() expects parameter 1 to be IntlCalendar, int given diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt index fa886053487..1957dbbc2d7 100644 --- a/ext/intl/tests/calendar_fieldDifference_error.phpt +++ b/ext/intl/tests/calendar_fieldDifference_error.phpt @@ -32,7 +32,7 @@ Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU bool(false) intlcal_field_difference() expects exactly 3 parameters, 4 given -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_field_difference() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_field_difference(1, 0, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt index 2722f540521..c138be81965 100644 --- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt +++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_get_day_of_week_type(1, 1)); Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_day_of_week_type() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_day_of_week_type(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt index 56e748fa129..9dafc0ed948 100644 --- a/ext/intl/tests/calendar_getErrorCode_error.phpt +++ b/ext/intl/tests/calendar_getErrorCode_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_error_code(null)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_error_code() expects parameter 1 to be IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt index 8cdbb1f34b1..abdfef45b67 100644 --- a/ext/intl/tests/calendar_getErrorMessage_error.phpt +++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_error_message(null)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_error_message() expects parameter 1 to be IntlCalendar, null given in %s:%d Stack trace: #0 %s(%d): intlcal_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt index 68e0fd90748..f91e81dd694 100644 --- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_first_day_of_week(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_first_day_of_week() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_first_day_of_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt index c033d82cf34..90102a53f62 100644 --- a/ext/intl/tests/calendar_getLocale_error.phpt +++ b/ext/intl/tests/calendar_getLocale_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_locale(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught ArgumentCountError: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s:%d Stack trace: #0 %s(%d): intlcal_get_locale(1) #1 {main} diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt index fe3825ad684..64e7530d9c9 100644 --- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_minimal_days_in_first_week(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_minimal_days_in_first_week() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_minimal_days_in_first_week(1) #1 {main} diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt index 57eca0996e8..1e2b3f85dbb 100644 --- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_skipped_wall_time_option(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_skipped_wall_time_option() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_skipped_wall_time_option(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt index f78d93f454a..683d1e66ee0 100644 --- a/ext/intl/tests/calendar_getTimeZone_error.phpt +++ b/ext/intl/tests/calendar_getTimeZone_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_time_zone(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_time_zone() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time_zone(1) #1 {main} diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt index 51cb0cfe7e8..ca0924ee97e 100644 --- a/ext/intl/tests/calendar_getTime_error.phpt +++ b/ext/intl/tests/calendar_getTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_time() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt index abc5f17fdd8..1c0e92b07fe 100644 --- a/ext/intl/tests/calendar_getType_error.phpt +++ b/ext/intl/tests/calendar_getType_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_type(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_type() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_type(1) #1 {main} diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt index f6a4a71c18c..12bfbaa5fba 100644 --- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt +++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt @@ -18,7 +18,7 @@ var_dump(intlcal_get_weekend_transition(1, 1)); Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_get_weekend_transition() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_get_weekend_transition(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt index 96128621191..828f6a71d0b 100644 --- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt +++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt @@ -71,10 +71,10 @@ bool(false) Warning: intlcal_get_minimum(): intlcal_get_minimum: invalid field in %s on line %d bool(false) -error: 0, Argument 1 passed to intlcal_get_least_maximum() must be an instance of IntlCalendar, int given +error: 0, intlcal_get_least_maximum() expects parameter 1 to be IntlCalendar, int given -error: 0, Argument 1 passed to intlcal_get_maximum() must be an instance of IntlCalendar, int given +error: 0, intlcal_get_maximum() expects parameter 1 to be IntlCalendar, int given -error: 0, Argument 1 passed to intlcal_get_greatest_minimum() must be an instance of IntlCalendar, int given +error: 0, intlcal_get_greatest_minimum() expects parameter 1 to be IntlCalendar, int given -error: 0, Argument 1 passed to intlcal_get_minimum() must be an instance of IntlCalendar, int given +error: 0, intlcal_get_minimum() expects parameter 1 to be IntlCalendar, int given diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt index 98408a43272..22a4b859ab1 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt @@ -99,8 +99,8 @@ error: 0, intlcal_get_actual_maximum() expects parameter 2 to be int, string giv error: 0, intlcal_get_actual_minimum() expects parameter 2 to be int, string given -error: 0, Argument 1 passed to intlcal_get() must be an instance of IntlCalendar, int given +error: 0, intlcal_get() expects exactly 2 parameters, 1 given -error: 0, Argument 1 passed to intlcal_get_actual_maximum() must be an instance of IntlCalendar, int given +error: 0, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given -error: 0, Argument 1 passed to intlcal_get_actual_minimum() must be an instance of IntlCalendar, int given +error: 0, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt index bbcfcaabb1b..4eab7b2fe4e 100644 --- a/ext/intl/tests/calendar_inDaylightTime_error.phpt +++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_in_daylight_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_in_daylight_time() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_in_daylight_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt index 254d1dab846..9faecdd7e10 100644 --- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt +++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt @@ -49,14 +49,14 @@ try { echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; } --EXPECT-- -error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, int given +error: 0, IntlCalendar::isEquivalentTo() expects parameter 1 to be IntlCalendar, int given error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given -error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, int given +error: 0, IntlCalendar::isEquivalentTo() expects parameter 1 to be IntlCalendar, int given error: 0, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given -error: 0, Argument 2 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, int given +error: 0, intlcal_is_equivalent_to() expects parameter 2 to be IntlCalendar, int given -error: 0, Argument 1 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, int given +error: 0, intlcal_is_equivalent_to() expects parameter 1 to be IntlCalendar, int given diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt index 6fec3073499..4edbf70e559 100644 --- a/ext/intl/tests/calendar_isLenient_error.phpt +++ b/ext/intl/tests/calendar_isLenient_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_is_lenient(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_lenient() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_lenient(1) #1 {main} diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt index 9cb266f7422..169fb2dd431 100644 --- a/ext/intl/tests/calendar_isSet_error.phpt +++ b/ext/intl/tests/calendar_isSet_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_is_set(1, 2)); Warning: IntlCalendar::isSet(): intlcal_is_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_set() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_set(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt index de40b2aee69..0ed3e507b03 100644 --- a/ext/intl/tests/calendar_isWeekend_error.phpt +++ b/ext/intl/tests/calendar_isWeekend_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_is_weekend(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_is_weekend() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_is_weekend(1) #1 {main} diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt index bc00896d8b8..b627e836173 100644 --- a/ext/intl/tests/calendar_roll_error.phpt +++ b/ext/intl/tests/calendar_roll_error.phpt @@ -19,7 +19,7 @@ var_dump(intlcal_roll(1, 2, 3)); Warning: IntlCalendar::roll(): intlcal_roll: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_roll() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_roll(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt index 6dcff918a78..bb4e01ca000 100644 --- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_first_day_of_week() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_first_day_of_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt index 2d73857c2b4..896b2e430a8 100644 --- a/ext/intl/tests/calendar_setLenient_error.phpt +++ b/ext/intl/tests/calendar_setLenient_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_set_lenient(1, false)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_lenient() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_lenient(1, false) #1 {main} diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt index 430fc953bd7..9bf3cb17dca 100644 --- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: intlcal_set_minimal_days_in_first_week(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_minimal_days_in_first_week() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_minimal_days_in_first_week(1, 2) #1 {main} diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt index e3d03815dc9..079517b2902 100644 --- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt @@ -23,7 +23,7 @@ bool(false) Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: invalid option in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set_repeated_wall_time_option() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1) #1 {main} diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt index 1cace3b4eaa..3f5e479e795 100644 --- a/ext/intl/tests/calendar_setTimeZone_error.phpt +++ b/ext/intl/tests/calendar_setTimeZone_error.phpt @@ -47,4 +47,4 @@ error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given error: 0, intlcal_set_time_zone() expects exactly 2 parameters, 3 given -error: 0, Argument 1 passed to intlcal_set_time_zone() must be an instance of IntlCalendar, int given +error: 0, intlcal_set_time_zone() expects parameter 1 to be IntlCalendar, int given diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt index 6ecbd698bf9..0fb906bc2fa 100644 --- a/ext/intl/tests/calendar_setTime_error.phpt +++ b/ext/intl/tests/calendar_setTime_error.phpt @@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_set_time(1)); --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught ArgumentCountError: intlcal_set_time() expects exactly 2 parameters, 1 given in %s:%d Stack trace: #0 %s(%d): intlcal_set_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index 2116786d322..8f48c0f9753 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -27,7 +27,7 @@ bool(false) Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_set() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_set(1, 2, 3) #1 {main} diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt index e251c501b60..ef799db6104 100644 --- a/ext/intl/tests/calendar_toDateTime_error.phpt +++ b/ext/intl/tests/calendar_toDateTime_error.phpt @@ -21,7 +21,7 @@ var_dump(intlcal_to_date_time(3)); Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlcal_to_date_time() expects parameter 1 to be IntlCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlcal_to_date_time(3) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt index 3353690d1cc..37a0315c45f 100644 --- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt @@ -14,7 +14,7 @@ var_dump(intlgregcal_get_gregorian_change(1)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlgregcal_get_gregorian_change() expects parameter 1 to be IntlGregorianCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlgregcal_get_gregorian_change(1) #1 {main} diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt index 701e643e00d..9b7c3e0be8d 100644 --- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt +++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt @@ -14,7 +14,7 @@ var_dump(intlgregcal_is_leap_year(1, 2)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, int given in %s:%d +Fatal error: Uncaught TypeError: intlgregcal_is_leap_year() expects parameter 1 to be IntlGregorianCalendar, int given in %s:%d Stack trace: #0 %s(%d): intlgregcal_is_leap_year(1, 2) #1 {main} diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt index ebb0eb7776a..c20da9021a4 100644 --- a/ext/intl/tests/timezone_getDSTSavings_error.phpt +++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_dst_savings(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_dst_savings() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_dst_savings(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt index 108530d2c3f..7f8d913a17c 100644 --- a/ext/intl/tests/timezone_getDisplayName_error.phpt +++ b/ext/intl/tests/timezone_getDisplayName_error.phpt @@ -16,7 +16,7 @@ var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_P Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_display_name() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT') #1 {main} diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt index 657e09b240f..5b4a59f17f5 100644 --- a/ext/intl/tests/timezone_getErrorCode_error.phpt +++ b/ext/intl/tests/timezone_getErrorCode_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_error_code(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_error_code() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_code(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt index 3ea812050b8..ffceff358c2 100644 --- a/ext/intl/tests/timezone_getErrorMessage_error.phpt +++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intltz_get_error_message(null)); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_error_message() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_error_message(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt index 81d36b9d0b4..1ba7d7482fe 100644 --- a/ext/intl/tests/timezone_getID_error.phpt +++ b/ext/intl/tests/timezone_getID_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_get_id(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_id() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_id(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt index 3ae06e4ce00..95dc638adbc 100644 --- a/ext/intl/tests/timezone_getOffset_error.phpt +++ b/ext/intl/tests/timezone_getOffset_error.phpt @@ -17,7 +17,7 @@ intltz_get_offset(null, time()*1000, false, $a, $a); Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d bool(false) -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_offset() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL) #1 {main} diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt index 9e0691f39d6..a16b62468b2 100644 --- a/ext/intl/tests/timezone_getRawOffset_error.phpt +++ b/ext/intl/tests/timezone_getRawOffset_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_get_raw_offset(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_get_raw_offset() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_get_raw_offset(NULL) #1 {main} diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt index 4ec73a96a6a..07aa15039ce 100644 --- a/ext/intl/tests/timezone_hasSameRules_error.phpt +++ b/ext/intl/tests/timezone_hasSameRules_error.phpt @@ -31,7 +31,7 @@ try { } --EXPECT-- int(0) -string(99) "Argument 1 passed to IntlTimeZone::hasSameRules() must be an instance of IntlTimeZone, string given" +string(81) "IntlTimeZone::hasSameRules() expects parameter 1 to be IntlTimeZone, string given" int(0) -string(92) "Argument 1 passed to intltz_has_same_rules() must be an instance of IntlTimeZone, null given" +string(74) "intltz_has_same_rules() expects parameter 1 to be IntlTimeZone, null given" diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt index c402dec6736..9df2bbf70d3 100644 --- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt +++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt @@ -21,7 +21,7 @@ var_dump(intltz_to_date_time_zone(1)); Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: DateTimeZone constructor threw exception in %s on line %d string(66) "DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, int given in %s:%d +Fatal error: Uncaught TypeError: intltz_to_date_time_zone() expects parameter 1 to be IntlTimeZone, int given in %s:%d Stack trace: #0 %s(%d): intltz_to_date_time_zone(1) #1 {main} diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt index b872dcb18b8..5b37cd16b14 100644 --- a/ext/intl/tests/timezone_useDaylightTime_error.phpt +++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt @@ -11,7 +11,7 @@ ini_set("intl.error_level", E_WARNING); intltz_use_daylight_time(null); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d +Fatal error: Uncaught TypeError: intltz_use_daylight_time() expects parameter 1 to be IntlTimeZone, null given in %s:%d Stack trace: #0 %s(%d): intltz_use_daylight_time(NULL) #1 {main} diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt index a7fffa62b10..c8d6bdc5a64 100644 --- a/ext/intl/tests/transliterator_create_inverse_error.phpt +++ b/ext/intl/tests/transliterator_create_inverse_error.phpt @@ -10,7 +10,7 @@ ini_set("intl.error_level", E_WARNING); transliterator_create_inverse("jj"); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d +Fatal error: Uncaught TypeError: transliterator_create_inverse() expects parameter 1 to be Transliterator, string given in %s:%d Stack trace: #0 %s(%d): transliterator_create_inverse('jj') #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt index 813c8c480ef..ed766fd968c 100644 --- a/ext/intl/tests/transliterator_get_error_code_error.phpt +++ b/ext/intl/tests/transliterator_get_error_code_error.phpt @@ -8,7 +8,7 @@ ini_set("intl.error_level", E_WARNING); echo transliterator_get_error_code(array()), "\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: transliterator_get_error_code() expects parameter 1 to be Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_code(Array) #1 {main} diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt index 7bcc7df1696..04746c7a5ff 100644 --- a/ext/intl/tests/transliterator_get_error_message_error.phpt +++ b/ext/intl/tests/transliterator_get_error_message_error.phpt @@ -8,7 +8,7 @@ ini_set("intl.error_level", E_WARNING); echo transliterator_get_error_message(array()), "\n"; ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d +Fatal error: Uncaught TypeError: transliterator_get_error_message() expects parameter 1 to be Transliterator, array given in %s:%d Stack trace: #0 %s(%d): transliterator_get_error_message(Array) #1 {main} diff --git a/ext/opcache/jit/zend_jit_disasm_x86.c b/ext/opcache/jit/zend_jit_disasm_x86.c index 396cad432f7..c7b7bf5814a 100644 --- a/ext/opcache/jit/zend_jit_disasm_x86.c +++ b/ext/opcache/jit/zend_jit_disasm_x86.c @@ -433,7 +433,6 @@ static int zend_jit_disasm_init(void) REGISTER_HELPER(zend_jit_vm_stack_free_args_helper); REGISTER_HELPER(zend_jit_copy_extra_args_helper); REGISTER_HELPER(zend_jit_deprecated_or_abstract_helper); - REGISTER_HELPER(zend_jit_verify_internal_arg_types_helper); REGISTER_HELPER(zend_jit_assign_const_to_typed_ref); REGISTER_HELPER(zend_jit_assign_tmp_to_typed_ref); REGISTER_HELPER(zend_jit_assign_var_to_typed_ref); diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 98da0523b50..cfad5786ac4 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1489,25 +1489,6 @@ static void ZEND_FASTCALL zend_jit_vm_stack_free_args_helper(zend_execute_data * zend_vm_stack_free_args(call); } -static int ZEND_FASTCALL zend_jit_verify_internal_arg_types_helper(zend_execute_data *call) -{ - zend_function *fbc = call->func; - 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_check_internal_arg_type(fbc, i + 1, p); - if (UNEXPECTED(EG(exception))) { - EG(current_execute_data) = call->prev_execute_data; - zend_vm_stack_free_args(call); - return 0; - } - p++; - } - return 1; -} - static zend_always_inline void zend_jit_assign_to_typed_ref(zend_reference *ref, zval *value, zend_uchar value_type) { zval variable; diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 4501edbc7a6..5023db62da2 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -7680,26 +7680,6 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, zend_op_ar | // EG(current_execute_data) = execute_data; | MEM_OP2_1_ZTS mov, aword, executor_globals, current_execute_data, RX, r1 - if (!func || (func->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (!func) { - | test dword [r0 + offsetof(zend_op_array, fn_flags)], ZEND_ACC_HAS_TYPE_HINTS - | jnz >1 - |.cold_code - } - |1: - | mov FCARG1a, RX - | EXT_CALL zend_jit_verify_internal_arg_types_helper, r0 - | test r0, r0 - | je >8 - | LOAD_ZVAL_ADDR FCARG2a, res_addr // reload - if (!func) { - | mov r0, EX:RX->func // reload - | jmp >1 - |.code - } - |1: - } - zend_jit_reset_opline(Dst, NULL); | // fbc->internal_function.handler(call, ret); diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt index bd27dfc1736..de4fe65acef 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt @@ -16,8 +16,8 @@ var_dump($a); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s:8 +Fatal error: Uncaught TypeError: ReflectionClass::newInstanceArgs() expects parameter 1 to be array, string given in %s:%d Stack trace: #0 %s(%d): ReflectionClass->newInstanceArgs('x') #1 {main} - thrown in %s on line 8 + thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt index 6c81728f912..34e73c9a69b 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt @@ -24,4 +24,4 @@ try { ?> --EXPECT-- -string(89) "Argument 2 passed to ReflectionMethod::invokeArgs() must be of the type array, bool given" +string(74) "ReflectionMethod::invokeArgs() expects parameter 2 to be array, bool given" diff --git a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt index 6a05aa0aa20..35795084729 100644 --- a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt +++ b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt @@ -42,7 +42,7 @@ try { } --EXPECT-- CallbackFilterIterator::__construct() expects exactly 2 parameters, 0 given -Argument 1 passed to CallbackFilterIterator::__construct() must implement interface Iterator, null given +CallbackFilterIterator::__construct() expects exactly 2 parameters, 1 given CallbackFilterIterator::__construct() expects parameter 2 to be a valid callback, no array or string given CallbackFilterIterator::__construct() expects parameter 2 to be a valid callback, array must have exactly two members some message diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt index 944b40dd961..a115a7329cb 100644 --- a/ext/spl/tests/iterator_count.phpt +++ b/ext/spl/tests/iterator_count.phpt @@ -13,7 +13,7 @@ iterator_count('1'); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: iterator_count() expects parameter 1 to be Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_count('1') #1 {main} diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt index a5a8e5a9b7e..9225f03c00f 100644 --- a/ext/spl/tests/iterator_to_array.phpt +++ b/ext/spl/tests/iterator_to_array.phpt @@ -13,7 +13,7 @@ iterator_to_array('test','test'); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d +Fatal error: Uncaught TypeError: iterator_to_array() expects parameter 1 to be Traversable, string given in %s:%d Stack trace: #0 %s(%d): iterator_to_array('test', 'test') #1 {main} diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index 72458446e1c..857d5de685a 100644 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -86,7 +86,7 @@ int(5) int(6) int(4) ===ERRORS=== -Argument 3 passed to iterator_apply() must be of the type array or null, int given +iterator_apply() expects parameter 3 to be array, int given iterator_apply() expects parameter 2 to be a valid callback, function 'non_existing_function' not found or invalid function name iterator_apply() expects at most 3 parameters, 4 given ===DONE===