Don't verify arginfo types for internal functions

To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
This commit is contained in:
Nikita Popov 2019-06-06 13:05:11 +02:00
parent be6c083f28
commit 4d90848d68
63 changed files with 207 additions and 191 deletions

View File

@ -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
========================

View File

@ -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);
}

View File

@ -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);

View File

@ -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)) {

View File

@ -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)) {

View File

@ -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}

View File

@ -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===

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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"

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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===