Fix the default value of the $length parameter of grapheme_substr()

This commit is contained in:
Máté Kocsis 2020-04-10 18:04:17 +02:00
parent ce3b49a8e8
commit 4aa137c6a6
No known key found for this signature in database
GPG key ID: FD055E41728BF310
2 changed files with 2 additions and 2 deletions

View file

@ -245,7 +245,7 @@ function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): in
function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {}
function grapheme_substr(string $string, int $start, ?int $length = 0): string|false {}
function grapheme_substr(string $string, int $start, ?int $length = null): string|false {}
function grapheme_strstr(string $haystack, string $needle, bool $before_needle = false): string|false {}

View file

@ -463,7 +463,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)