Skip to content

Commit 9ae0493

Browse files
committed
Review round 2
1 parent dc8e8ff commit 9ae0493

8 files changed

+31
-31
lines changed

Zend/tests/002.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,26 @@ try {
9696
echo "Done\n";
9797
?>
9898
--EXPECTF--
99-
func_get_arg(): Argument #1 ($argument_number) must be greater than or equal to 0
100-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
101-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
102-
func_get_arg(): Argument #1 ($argument_number) must be greater than or equal to 0
99+
func_get_arg(): Argument #1 ($position) must be greater than or equal to 0
100+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
101+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
102+
func_get_arg(): Argument #1 ($position) must be greater than or equal to 0
103103
int(10)
104-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
104+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
105105
int(1)
106-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
106+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
107107
Exception: Too few arguments to function test2(), 0 passed in %s002.php on line %d and exactly 1 expected
108108
int(1)
109109
int(2)
110-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
111-
func_get_arg(): Argument #1 ($argument_number) must be greater than or equal to 0
112-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
113-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
110+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
111+
func_get_arg(): Argument #1 ($position) must be greater than or equal to 0
112+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
113+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
114114
Exception: Too few arguments to function test3(), 1 passed in %s on line %d and exactly 2 expected
115115
int(1)
116116
int(2)
117-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
117+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
118118
int(1)
119-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
119+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
120120
func_get_arg() cannot be called from the global scope
121121
Done

Zend/tests/020.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ try {
2626
?>
2727
--EXPECT--
2828
func_get_arg() cannot be called from the global scope
29-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
29+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,7 @@ ZEND_FUNCTION(define)
499499
}
500500

501501
if (non_cs) {
502-
zend_error(E_WARNING, "define(): Declaration of case-insensitive constants is no longer supported");
503-
RETURN_FALSE;
502+
zend_error(E_WARNING, "define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported");
504503
}
505504

506505
ZVAL_UNDEF(&val_free);

Zend/zend_builtin_functions.stub.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function zend_version(): string {}
66

77
function func_num_args(): int {}
88

9-
function func_get_arg(int $argument_number): mixed {}
9+
function func_get_arg(int $position): mixed {}
1010

1111
function func_get_args(): array {}
1212

@@ -22,7 +22,7 @@ function strncasecmp(string $string1, string $string2, int $length): int {}
2222

2323
function error_reporting(?int $error_level = null): int {}
2424

25-
/** @param bool|int|float|string|array|resource|null $value */
25+
/** @param mixed $value */
2626
function define(string $constant_name, $value, $case_insensitive = false): bool {}
2727

2828
function defined(string $constant_name): bool {}
@@ -33,9 +33,11 @@ function get_called_class(): string {}
3333

3434
function get_parent_class(string|object $object = UNKNOWN): string|false {}
3535

36-
function is_subclass_of($object, string $class_name, bool $allow_string = true): bool {}
36+
/** @param object|string $object */
37+
function is_subclass_of(mixed $object, string $class_name, bool $allow_string = true): bool {}
3738

38-
function is_a($object, string $class_name, bool $allow_string = false): bool {}
39+
/** @param object|string $object */
40+
function is_a(mixed $object, string $class_name, bool $allow_string = false): bool {}
3941

4042
function get_class_vars(string $class_name): array|false {}
4143

@@ -47,10 +49,10 @@ function get_mangled_object_vars(object $object): array {}
4749
function get_class_methods($class): array {}
4850

4951
/** @param object|string $object_or_class */
50-
function method_exists($object_or_class, string $method): bool {}
52+
function method_exists(mixed $object_or_class, string $method): bool {}
5153

5254
/** @param object|string $object_or_class */
53-
function property_exists($object_or_class, string $property_name): bool {}
55+
function property_exists(mixed $object_or_class, string $property): bool {}
5456

5557
function class_exists(string $class_name, bool $autoload = true): bool {}
5658

Zend/zend_builtin_functions_arginfo.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 13ccb76ae84972dc12a26555e9d8652e58150378 */
2+
* Stub hash: b54cd767a1c2fd07865460fc9df8368ee988c823 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0)
55
ZEND_END_ARG_INFO()
@@ -8,7 +8,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_func_num_args, 0, 0, IS_LONG, 0)
88
ZEND_END_ARG_INFO()
99

1010
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_func_get_arg, 0, 1, IS_MIXED, 0)
11-
ZEND_ARG_TYPE_INFO(0, argument_number, IS_LONG, 0)
11+
ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0)
1212
ZEND_END_ARG_INFO()
1313

1414
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_func_get_args, 0, 0, IS_ARRAY, 0)
@@ -58,13 +58,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_parent_class, 0, 0, MAY_BE_S
5858
ZEND_END_ARG_INFO()
5959

6060
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_subclass_of, 0, 2, _IS_BOOL, 0)
61-
ZEND_ARG_INFO(0, object)
61+
ZEND_ARG_TYPE_INFO(0, object, IS_MIXED, 0)
6262
ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0)
6363
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allow_string, _IS_BOOL, 0, "true")
6464
ZEND_END_ARG_INFO()
6565

6666
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_is_a, 0, 2, _IS_BOOL, 0)
67-
ZEND_ARG_INFO(0, object)
67+
ZEND_ARG_TYPE_INFO(0, object, IS_MIXED, 0)
6868
ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0)
6969
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allow_string, _IS_BOOL, 0, "false")
7070
ZEND_END_ARG_INFO()
@@ -90,7 +90,7 @@ ZEND_END_ARG_INFO()
9090

9191
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_property_exists, 0, 2, _IS_BOOL, 0)
9292
ZEND_ARG_INFO(0, object_or_class)
93-
ZEND_ARG_TYPE_INFO(0, property_name, IS_STRING, 0)
93+
ZEND_ARG_TYPE_INFO(0, property, IS_STRING, 0)
9494
ZEND_END_ARG_INFO()
9595

9696
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_exists, 0, 1, _IS_BOOL, 0)

ext/com_dotnet/com_com.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,7 @@ PHP_FUNCTION(com_load_typelib)
821821
}
822822

823823
if (!cs) {
824-
php_error_docref(NULL, E_WARNING, "Declaration of case-insensitive constants is no longer supported");
825-
RETURN_FALSE;
824+
php_error_docref(NULL, E_WARNING, "com_load_typelib(): Argument #2 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported");
826825
}
827826

828827
RETVAL_FALSE;

tests/lang/func_get_arg.004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ foo(2, 3);
1515

1616
?>
1717
--EXPECT--
18-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
18+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function

tests/lang/func_get_arg_variation.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ foo(2);
2222

2323
?>
2424
--EXPECT--
25-
func_get_arg(): Argument #1 ($argument_number) must be greater than or equal to 0
26-
func_get_arg(): Argument #1 ($argument_number) must be less than the number of the arguments passed to the currently executed function
25+
func_get_arg(): Argument #1 ($position) must be greater than or equal to 0
26+
func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function

0 commit comments

Comments
 (0)