Skip to content

Commit 1aafe97

Browse files
committed
less aggressive stubs refactor
1 parent 7e4d3c1 commit 1aafe97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ 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 {}
584+
function substr(string $str, int $start, ?int $length = null): string|false {}
585585

586586
/**
587587
* @param mixed $start

ext/standard/basic_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ 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_INFO_EX(arginfo_substr, 0, 2, IS_STRING, 0)
934+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
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")

0 commit comments

Comments
 (0)