Skip to content

Commit ea31d46

Browse files
committed
stubs
1 parent 96be5f6 commit ea31d46

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,9 @@ function bin2hex(string $data): string {}
549549

550550
function hex2bin(string $data): string|false {}
551551

552-
function strspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN): int|false {}
552+
function strspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN): int {}
553553

554-
function strcspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN): int|false {}
554+
function strcspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN): int {}
555555

556556
#if HAVE_NL_LANGINFO
557557
function nl_langinfo(int $item): string|false {}
@@ -610,14 +610,14 @@ function str_contains(string $haystack, string $needle): bool {}
610610

611611
function chunk_split(string $str, int $chunklen = 76, string $ending = "\r\n"): string {}
612612

613-
function substr(string $str, int $start, ?int $length = null): string|false {}
613+
function substr(string $str, int $start, ?int $length = null): string {}
614614

615615
/**
616616
* @param mixed $start
617617
* @param mixed $length
618618
*/
619619
function substr_replace(
620-
string|array $str, string|array $replace, $start, $length = UNKNOWN): string|array|false {}
620+
string|array $str, string|array $replace, $start, $length = UNKNOWN): string|array {}
621621

622622
function quotemeta(string $str): string {}
623623

@@ -705,7 +705,7 @@ function str_split(string $str, int $split_length = 1): array {}
705705

706706
function strpbrk(string $haystack, string $char_list): string|false {}
707707

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

710710
function utf8_encode(string $data): string {}
711711

ext/standard/basic_functions_arginfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hex2bin, 0, 1, MAY_BE_STRING|MAY
816816
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
817817
ZEND_END_ARG_INFO()
818818

819-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strspn, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
819+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strspn, 0, 2, IS_LONG, 0)
820820
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
821821
ZEND_ARG_TYPE_INFO(0, mask, IS_STRING, 0)
822822
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0")
@@ -929,13 +929,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chunk_split, 0, 1, IS_STRING, 0)
929929
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\\r\\n\"")
930930
ZEND_END_ARG_INFO()
931931

932-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
932+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr, 0, 2, IS_STRING, 0)
933933
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
934934
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
935935
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
936936
ZEND_END_ARG_INFO()
937937

938-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
938+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY)
939939
ZEND_ARG_TYPE_MASK(0, str, MAY_BE_STRING|MAY_BE_ARRAY, NULL)
940940
ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY, NULL)
941941
ZEND_ARG_INFO(0, start)
@@ -1087,7 +1087,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY
10871087
ZEND_ARG_TYPE_INFO(0, char_list, IS_STRING, 0)
10881088
ZEND_END_ARG_INFO()
10891089

1090-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_compare, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
1090+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_compare, 0, 3, IS_LONG, 0)
10911091
ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0)
10921092
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
10931093
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)

0 commit comments

Comments
 (0)