Skip to content

Commit 7e4d3c1

Browse files
committed
stubs
1 parent 57ecd8e commit 7e4d3c1

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
@@ -516,9 +516,9 @@ function bin2hex(string $data): string {}
516516

517517
function hex2bin(string $data): string|false {}
518518

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

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

523523
#if HAVE_NL_LANGINFO
524524
function nl_langinfo(int $item): string|false {}
@@ -581,14 +581,14 @@ function str_ends_with(string $haystack, string $needle): bool {}
581581

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

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

586586
/**
587587
* @param mixed $start
588588
* @param mixed $length
589589
*/
590590
function substr_replace(
591-
string|array $str, string|array $replace, $start, $length = UNKNOWN): string|array|false {}
591+
string|array $str, string|array $replace, $start, $length = UNKNOWN): string|array {}
592592

593593
function quotemeta(string $str): string {}
594594

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

677677
function strpbrk(string $haystack, string $char_list): string|false {}
678678

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

681681
function utf8_encode(string $data): string {}
682682

ext/standard/basic_functions_arginfo.h

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

817-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strspn, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
817+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strspn, 0, 2, IS_LONG, 0)
818818
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
819819
ZEND_ARG_TYPE_INFO(0, mask, IS_STRING, 0)
820820
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0")
@@ -931,13 +931,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chunk_split, 0, 1, IS_STRING, 0)
931931
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ending, IS_STRING, 0, "\"\\r\\n\"")
932932
ZEND_END_ARG_INFO()
933933

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

940-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
940+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY)
941941
ZEND_ARG_TYPE_MASK(0, str, MAY_BE_STRING|MAY_BE_ARRAY, NULL)
942942
ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY, NULL)
943943
ZEND_ARG_INFO(0, start)
@@ -1089,7 +1089,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY
10891089
ZEND_ARG_TYPE_INFO(0, char_list, IS_STRING, 0)
10901090
ZEND_END_ARG_INFO()
10911091

1092-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_compare, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
1092+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_substr_compare, 0, 3, IS_LONG, 0)
10931093
ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0)
10941094
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
10951095
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)

0 commit comments

Comments
 (0)