Skip to content

Commit 663d012

Browse files
committed
Code review changes
1 parent b7a1b39 commit 663d012

File tree

108 files changed

+238
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+238
-241
lines changed

Zend/tests/bug46106.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ try {
2323
?>
2424
DONE
2525
--EXPECT--
26-
str_pad(): At least 2 arguments are expected, 1 given
26+
str_pad() expects at least 2 arguments, 1 given
2727
DONE

Zend/tests/bug51827.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ register_shutdown_function('exploDe');
1616
--EXPECT--
1717
int(1)
1818

19-
Fatal error: Uncaught ArgumentCountError: explode(): At least 2 arguments are expected, 0 given in [no active file]:0
19+
Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 arguments, 0 given in [no active file]:0
2020
Stack trace:
2121
#0 [internal function]: explode()
2222
#1 {main}

Zend/tests/bug72107.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ try {
1313
}
1414
?>
1515
--EXPECT--
16-
func_get_args() expects exactly 0 parameters, 4 given
16+
func_get_args() expects exactly 0 arguments, 4 given

Zend/tests/function_arguments/argument_count_incorrect_internal.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ try {
99
}
1010
?>
1111
--EXPECT--
12-
substr(): At least 2 arguments are expected, 1 given
12+
substr() expects at least 2 arguments, 1 given

Zend/tests/function_arguments/argument_count_incorrect_internal_strict.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ try {
1919
?>
2020
--EXPECT--
2121
ArgumentCountError
22-
substr(): At least 2 arguments are expected, 1 given
22+
substr() expects at least 2 arguments, 1 given
2323
ArgumentCountError
2424
At least 2 parameters are required, 1 given

Zend/tests/nullsafe_operator/013.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ int(0)
5050
string(98) "call_user_func_array(): Argument #1 ($function) must be a valid callback, no array or string given"
5151
string(77) "call_user_func_array(): Argument #2 ($args) must be of type array, null given"
5252
string(69) "get_class(): Argument #1 ($object) must be of type object, null given"
53-
string(56) "get_called_class() expects exactly 0 parameters, 1 given"
53+
string(55) "get_called_class() expects exactly 0 arguments, 1 given"
5454
string(4) "NULL"
55-
string(53) "func_num_args() expects exactly 0 parameters, 1 given"
56-
string(53) "func_get_args() expects exactly 0 parameters, 1 given"
55+
string(52) "func_num_args() expects exactly 0 arguments, 1 given"
56+
string(52) "func_get_args() expects exactly 0 arguments, 1 given"
5757
string(69) "array_slice(): Argument #1 ($array) must be of type array, null given"
5858
array(1) {
5959
[0]=>

Zend/zend_API.c

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -183,33 +183,29 @@ ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg) /* {{{ */
183183
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error(void) /* {{{ */
184184
{
185185
int num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data));
186-
zend_function *active_function = EG(current_execute_data)->func;
187-
const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : "";
186+
zend_string *func_name = get_active_function_or_method_name();
188187

189-
zend_argument_count_error(
190-
"%s%s%s() expects exactly 0 parameters, %d given",
191-
class_name, \
192-
class_name[0] ? "::" : "", \
193-
ZSTR_VAL(active_function->common.function_name),
194-
num_args);
188+
zend_argument_count_error("%s() expects exactly 0 arguments, %d given", ZSTR_VAL(func_name), num_args);
189+
190+
zend_string_release(func_name);
195191
}
196192
/* }}} */
197193

198194
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(uint32_t min_num_args, uint32_t max_num_args) /* {{{ */
199195
{
200196
uint32_t num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data));
201-
char *func_name = get_active_function_or_method_name();
197+
zend_string *func_name = get_active_function_or_method_name();
202198

203199
zend_argument_count_error(
204-
"%s(): %s %d argument%s %s expected, %d given",
205-
func_name, min_num_args == max_num_args ? "Exactly" : num_args < min_num_args ? "At least" : "At most",
200+
"%s() expects %s %d argument%s, %d given",
201+
ZSTR_VAL(func_name),
202+
min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most",
206203
num_args < min_num_args ? min_num_args : max_num_args,
207204
(num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s",
208-
(num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "is" : "are",
209205
num_args
210206
);
211207

212-
efree(func_name);
208+
zend_string_release(func_name);
213209
}
214210
/* }}} */
215211

@@ -319,7 +315,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_unexpected_extra_named_error(void)
319315

320316
static ZEND_COLD void ZEND_FASTCALL zend_argument_error_variadic(zend_class_entry *error_ce, uint32_t arg_num, const char *format, va_list va) /* {{{ */
321317
{
322-
char *func_name;
318+
zend_string *func_name;
323319
const char *arg_name;
324320
char *message = NULL;
325321
if (EG(exception)) {
@@ -331,11 +327,11 @@ static ZEND_COLD void ZEND_FASTCALL zend_argument_error_variadic(zend_class_entr
331327

332328
zend_vspprintf(&message, 0, format, va);
333329
zend_throw_error(error_ce, "%s(): Argument #%d%s%s%s %s",
334-
func_name, arg_num,
330+
ZSTR_VAL(func_name), arg_num,
335331
arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "", message
336332
);
337333
efree(message);
338-
efree(func_name);
334+
zend_string_release(func_name);
339335
}
340336
/* }}} */
341337

@@ -991,16 +987,17 @@ static zend_result zend_parse_va_args(uint32_t num_args, const char *type_spec,
991987

992988
if (num_args < min_num_args || num_args > max_num_args) {
993989
if (!(flags & ZEND_PARSE_PARAMS_QUIET)) {
994-
char *func_name = get_active_function_or_method_name();
995-
zend_argument_count_error("%s(): %s %d argument%s %s expected, %d given",
996-
func_name, min_num_args == max_num_args ? "Exactly" : num_args < min_num_args ? "At least" : "At most",
990+
zend_string *func_name = get_active_function_or_method_name();
991+
992+
zend_argument_count_error("%s() expects %s %d argument%s, %d given",
993+
ZSTR_VAL(func_name),
994+
min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most",
997995
num_args < min_num_args ? min_num_args : max_num_args,
998996
(num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s",
999-
(num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "is" : "are",
1000997
num_args
1001998
);
1002999

1003-
efree(func_name);
1000+
zend_string_release(func_name);
10041001
}
10051002
return FAILURE;
10061003
}

Zend/zend_execute.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ ZEND_API const char *get_active_function_name(void);
313313
ZEND_API const char *get_function_name(const zend_function *func);
314314
ZEND_API const char *get_active_function_arg_name(uint32_t arg_num);
315315
ZEND_API const char *get_function_arg_name(const zend_function *func, uint32_t arg_num);
316-
ZEND_API char *get_active_function_or_method_name();
317-
ZEND_API char *get_function_or_method_name(const zend_function *func);
316+
ZEND_API zend_string *get_active_function_or_method_name();
317+
ZEND_API zend_string *get_function_or_method_name(const zend_function *func);
318318
ZEND_API const char *zend_get_executed_filename(void);
319319
ZEND_API zend_string *zend_get_executed_filename_ex(void);
320320
ZEND_API uint32_t zend_get_executed_lineno(void);

Zend/zend_execute_API.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -499,26 +499,25 @@ ZEND_API const char *get_function_name(const zend_function *func) /* {{{ */
499499
}
500500
/* }}} */
501501

502-
ZEND_API char *get_active_function_or_method_name(void) /* {{{ */
502+
ZEND_API zend_string *get_active_function_or_method_name(void) /* {{{ */
503503
{
504504
if (!zend_is_executing()) {
505-
return "";
505+
return zend_string_init("", 0, 0);
506506
}
507507

508508
return get_function_or_method_name(EG(current_execute_data)->func);
509509
}
510510
/* }}} */
511511

512-
ZEND_API char *get_function_or_method_name(const zend_function *func) /* {{{ */
512+
ZEND_API zend_string *get_function_or_method_name(const zend_function *func) /* {{{ */
513513
{
514-
char *name = NULL;
515-
const char *class_name, *space;
516-
517-
class_name = get_class_name(func, &space);
514+
const char *name = get_function_name(func);
518515

519-
zend_spprintf(&name, 0, "%s%s%s", class_name, space, get_function_name(func));
516+
if (func->common.scope) {
517+
return zend_create_member_string(func->common.scope->name, zend_string_init(name, strlen(name), 1));
518+
}
520519

521-
return name;
520+
return zend_string_init(name, strlen(name), 0);
522521
}
523522
/* }}} */
524523

Zend/zend_vm_def.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4596,16 +4596,16 @@ ZEND_VM_HOT_HANDLER(65, ZEND_SEND_VAL, CONST|TMPVAR, CONST|UNUSED|NUM)
45964596
ZEND_VM_COLD_HELPER(zend_cannot_pass_by_ref_helper, ANY, ANY, uint32_t _arg_num, zval *_arg)
45974597
{
45984598
USE_OPLINE
4599-
char *func_name = get_function_or_method_name(EX(call)->func);
4599+
zend_string *func_name = get_function_or_method_name(EX(call)->func);
46004600
const char *param_name = get_function_arg_name(EX(call)->func, _arg_num);
46014601

46024602
SAVE_OPLINE();
46034603

46044604
zend_throw_error(NULL, "%s(): Argument #%d%s%s%s cannot be passed by reference",
4605-
func_name, _arg_num, param_name ? " ($" : "",
4605+
ZSTR_VAL(func_name), _arg_num, param_name ? " ($" : "",
46064606
param_name ? param_name : "", param_name ? ")" : ""
46074607
);
4608-
efree(func_name);
4608+
zend_string_release(func_name);
46094609
FREE_OP1();
46104610
ZVAL_UNDEF(_arg);
46114611
HANDLE_EXCEPTION();

Zend/zend_vm_execute.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,16 +2281,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_CREATE_SPEC_HANDLER(
22812281
static zend_never_inline ZEND_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_cannot_pass_by_ref_helper_SPEC(uint32_t _arg_num, zval *_arg ZEND_OPCODE_HANDLER_ARGS_DC)
22822282
{
22832283
USE_OPLINE
2284-
char *func_name = get_function_or_method_name(EX(call)->func);
2284+
zend_string *func_name = get_function_or_method_name(EX(call)->func);
22852285
const char *param_name = get_function_arg_name(EX(call)->func, _arg_num);
22862286

22872287
SAVE_OPLINE();
22882288

22892289
zend_throw_error(NULL, "%s(): Argument #%d%s%s%s cannot be passed by reference",
2290-
func_name, _arg_num, param_name ? " ($" : "",
2290+
ZSTR_VAL(func_name), _arg_num, param_name ? " ($" : "",
22912291
param_name ? param_name : "", param_name ? ")" : ""
22922292
);
2293-
efree(func_name);
2293+
zend_string_release(func_name);
22942294
FREE_OP(opline->op1_type, opline->op1.var);
22952295
ZVAL_UNDEF(_arg);
22962296
HANDLE_EXCEPTION();

ext/date/tests/DateTimeZone_construct_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ try {
2121
*** Testing DateTimeZone() : error conditions ***
2222

2323
-- Testing new DateTimeZone() with more than expected no. of arguments --
24-
DateTimeZone::__construct(): Exactly 1 argument is expected, 2 given
24+
DateTimeZone::__construct() expects exactly 1 argument, 2 given

ext/date/tests/DateTime_construct_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ try {
2222
*** Testing date_create() : error conditions ***
2323

2424
-- Testing new DateTime() with more than expected no. of arguments --
25-
DateTime::__construct(): At most 2 arguments are expected, 3 given
25+
DateTime::__construct() expects at most 2 arguments, 3 given

ext/date/tests/mktime_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ try {
3333
*** Testing mktime() : error conditions ***
3434

3535
-- Testing mktime() function with Zero arguments --
36-
mktime(): At least 1 argument is expected, 0 given
36+
mktime() expects at least 1 argument, 0 given
3737

3838
-- Testing mktime() function with more than expected no. of arguments --
39-
mktime(): At most 6 arguments are expected, 7 given
39+
mktime() expects at most 6 arguments, 7 given

ext/dom/tests/DOMAttr_construct_error_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECT--
17-
DOMAttr::__construct(): At least 1 argument is expected, 0 given
17+
DOMAttr::__construct() expects at least 1 argument, 0 given

ext/dom/tests/DOMCDATASection_construct_error_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Nic Rosental nicrosental@gmail.com
1414
}
1515
?>
1616
--EXPECT--
17-
DOMCdataSection::__construct(): Exactly 1 argument is expected, 0 given
17+
DOMCdataSection::__construct() expects exactly 1 argument, 0 given

ext/dom/tests/DOMComment_construct_error_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECT--
17-
DOMComment::__construct(): At most 1 argument is expected, 2 given
17+
DOMComment::__construct() expects at most 1 argument, 2 given

ext/dom/tests/DOMDocumentFragment_construct_error_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECT--
17-
DOMDocumentFragment::__construct() expects exactly 0 parameters, 1 given
17+
DOMDocumentFragment::__construct() expects exactly 0 arguments, 1 given

ext/fileinfo/tests/bug61173.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ try {
1515
}
1616
?>
1717
--EXPECT--
18-
finfo::__construct(): At most 2 arguments are expected, 3 given
18+
finfo::__construct() expects at most 2 arguments, 3 given

ext/imap/tests/imap_timeout_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var_dump(imap_timeout(IMAP_WRITETIMEOUT));
4141
--EXPECTF--
4242
Checking with no parameters
4343

44-
Warning: imap_timeout() expects at least 1 parameter, 0 given in %s on line %d
44+
Warning: imap_timeout() expects at least 1 argument, 0 given in %s on line %d
4545
Checking with incorrect parameter type
4646

4747
Warning: imap_timeout(): Argument #1 must be of type int, %s given in %s on line %d

ext/intl/tests/breakiter___construct_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ try {
4646
--EXPECTF--
4747
Exception: IntlRuleBasedBreakIterator::__construct(): unable to create RuleBasedBreakIterator from rules (parse error on line 1, offset 31) in %s on line %d
4848

49-
Exception: IntlRuleBasedBreakIterator::__construct(): At least 1 argument is expected, 0 given in %s on line %d
49+
Exception: IntlRuleBasedBreakIterator::__construct() expects at least 1 argument, 0 given in %s on line %d
5050

51-
Exception: IntlRuleBasedBreakIterator::__construct(): At most 2 arguments are expected, 3 given in %s on line %d
51+
Exception: IntlRuleBasedBreakIterator::__construct() expects at most 2 arguments, 3 given in %s on line %d
5252

5353
Exception: IntlRuleBasedBreakIterator::__construct(): Argument #2 ($areCompiled) must be of type bool, array given in %s on line %d
5454

ext/intl/tests/calendar_before_after_error.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ try {
6262
}
6363
?>
6464
--EXPECT--
65-
error: 0, IntlCalendar::after(): Exactly 1 argument is expected, 0 given
65+
error: 0, IntlCalendar::after() expects exactly 1 argument, 0 given
6666

67-
error: 0, IntlCalendar::before(): Exactly 1 argument is expected, 0 given
67+
error: 0, IntlCalendar::before() expects exactly 1 argument, 0 given
6868

6969
error: 0, IntlCalendar::after(): Argument #1 ($calendar) must be of type IntlCalendar, int given
7070

7171
error: 0, IntlCalendar::before(): Argument #1 ($calendar) must be of type IntlCalendar, int given
7272

73-
error: 0, IntlCalendar::after(): Exactly 1 argument is expected, 2 given
73+
error: 0, IntlCalendar::after() expects exactly 1 argument, 2 given
7474

75-
error: 0, IntlCalendar::before(): Exactly 1 argument is expected, 2 given
75+
error: 0, IntlCalendar::before() expects exactly 1 argument, 2 given
7676

77-
error: 0, intlcal_after(): Exactly 2 arguments are expected, 1 given
77+
error: 0, intlcal_after() expects exactly 2 arguments, 1 given
7878

79-
error: 0, intlcal_before(): Exactly 2 arguments are expected, 1 given
79+
error: 0, intlcal_before() expects exactly 2 arguments, 1 given

ext/intl/tests/calendar_equals_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ try {
4646
}
4747
?>
4848
--EXPECT--
49-
error: 0, IntlCalendar::equals(): Exactly 1 argument is expected, 0 given
49+
error: 0, IntlCalendar::equals() expects exactly 1 argument, 0 given
5050

5151
error: 0, IntlCalendar::equals(): Argument #1 ($calendar) must be of type IntlCalendar, stdClass given
5252

53-
error: 0, IntlCalendar::equals(): Exactly 1 argument is expected, 2 given
53+
error: 0, IntlCalendar::equals() expects exactly 1 argument, 2 given
5454

5555
error: 0, intlcal_equals(): Argument #2 ($calendar) must be of type IntlCalendar, array given
5656

ext/intl/tests/calendar_fieldDifference_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ try {
2727
var_dump(intlcal_field_difference(1, 0, 1));
2828
?>
2929
--EXPECTF--
30-
IntlCalendar::fieldDifference(): Exactly 2 arguments are expected, 3 given
30+
IntlCalendar::fieldDifference() expects exactly 2 arguments, 3 given
3131

3232
Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in %s on line %d
3333
bool(false)
34-
intlcal_field_difference(): Exactly 3 arguments are expected, 4 given
34+
intlcal_field_difference() expects exactly 3 arguments, 4 given
3535

3636
Fatal error: Uncaught TypeError: intlcal_field_difference(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d
3737
Stack trace:

ext/intl/tests/calendar_getLocale_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ini_set("intl.error_level", E_WARNING);
1313
var_dump(intlcal_get_locale(1));
1414
?>
1515
--EXPECTF--
16-
Fatal error: Uncaught ArgumentCountError: intlcal_get_locale(): Exactly 2 arguments are expected, 1 given in %s:%d
16+
Fatal error: Uncaught ArgumentCountError: intlcal_get_locale() expects exactly 2 arguments, 1 given in %s:%d
1717
Stack trace:
1818
#0 %s(%d): intlcal_get_locale(1)
1919
#1 {main}

ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ try {
7676
}
7777
?>
7878
--EXPECT--
79-
ArgumentCountError: 0, intlcal_get(): Exactly 2 arguments are expected, 1 given
80-
ArgumentCountError: 0, intlcal_get_actual_maximum(): Exactly 2 arguments are expected, 1 given
81-
ArgumentCountError: 0, intlcal_get_actual_minimum(): Exactly 2 arguments are expected, 1 given
79+
ArgumentCountError: 0, intlcal_get() expects exactly 2 arguments, 1 given
80+
ArgumentCountError: 0, intlcal_get_actual_maximum() expects exactly 2 arguments, 1 given
81+
ArgumentCountError: 0, intlcal_get_actual_minimum() expects exactly 2 arguments, 1 given
8282
ValueError: 0, intlcal_get(): Argument #2 ($field) must be a valid field
8383
ValueError: 0, intlcal_get_actual_maximum(): Argument #2 ($field) must be a valid field
8484
ValueError: 0, intlcal_get_actual_minimum(): Argument #2 ($field) must be a valid field
8585
TypeError: 0, intlcal_get(): Argument #2 ($field) must be of type int, string given
8686
TypeError: 0, intlcal_get_actual_maximum(): Argument #2 ($field) must be of type int, string given
8787
TypeError: 0, intlcal_get_actual_minimum(): Argument #2 ($field) must be of type int, string given
88-
ArgumentCountError: 0, intlcal_get(): Exactly 2 arguments are expected, 1 given
89-
ArgumentCountError: 0, intlcal_get_actual_maximum(): Exactly 2 arguments are expected, 1 given
90-
ArgumentCountError: 0, intlcal_get_actual_minimum(): Exactly 2 arguments are expected, 1 given
88+
ArgumentCountError: 0, intlcal_get() expects exactly 2 arguments, 1 given
89+
ArgumentCountError: 0, intlcal_get_actual_maximum() expects exactly 2 arguments, 1 given
90+
ArgumentCountError: 0, intlcal_get_actual_minimum() expects exactly 2 arguments, 1 given

ext/intl/tests/calendar_isEquivalentTo_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ try {
5252
--EXPECT--
5353
error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($calendar) must be of type IntlCalendar, int given
5454

55-
error: 0, IntlCalendar::isEquivalentTo(): Exactly 1 argument is expected, 2 given
55+
error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 argument, 2 given
5656

5757
error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($calendar) must be of type IntlCalendar, int given
5858

59-
error: 0, intlcal_is_equivalent_to(): Exactly 2 arguments are expected, 1 given
59+
error: 0, intlcal_is_equivalent_to() expects exactly 2 arguments, 1 given
6060

6161
error: 0, intlcal_is_equivalent_to(): Argument #2 ($calendar) must be of type IntlCalendar, int given
6262

0 commit comments

Comments
 (0)