Skip to content

Commit d0fb2f4

Browse files
committed
substr_compare() cannot return false
1 parent 5d9ab53 commit d0fb2f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/standard/basic_functions.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ function str_split(string $str, int $split_length = 1): array {}
687687

688688
function strpbrk(string $haystack, string $char_list): string|false {}
689689

690-
function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false): int|false {}
690+
function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false): int {}
691691

692692
function utf8_encode(string $data): string {}
693693

ext/standard/basic_functions_arginfo.h

+2-2
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: 3f866608d73047b04b6a1abb6cbfa75abfeeed58 */
2+
* Stub hash: 5e8cd8c22edadede2814b26b6fb984f1c3626850 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -1082,7 +1082,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY
10821082
ZEND_ARG_TYPE_INFO(0, char_list, IS_STRING, 0)
10831083
ZEND_END_ARG_INFO()
10841084

1085-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_compare, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
1085+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_compare, 0, 3, IS_LONG, 0)
10861086
ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0)
10871087
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
10881088
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)

0 commit comments

Comments
 (0)