mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.1'
* PHP-8.1: Clarify that preg_match_all() cannot return null
This commit is contained in:
commit
2791afbf07
3 changed files with 4 additions and 10 deletions
|
@ -1207,7 +1207,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str,
|
|||
if (subpats != NULL) {
|
||||
subpats = zend_try_array_init(subpats);
|
||||
if (!subpats) {
|
||||
return;
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
function preg_match(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0): int|false {}
|
||||
|
||||
/** @param array $matches */
|
||||
function preg_match_all(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0): int|false|null {}
|
||||
function preg_match_all(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0): int|false {}
|
||||
|
||||
/**
|
||||
* @param int $count
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 62ab532c890b5421bfe8b784c803829cf71a1423 */
|
||||
* Stub hash: bc6f31ac17d4f5d1a60dd3dad5f671058f40a224 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
|
||||
|
@ -9,13 +9,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match, 0, 2, MAY_BE_LONG|MA
|
|||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match_all, 0, 2, MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL)
|
||||
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matches, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
|
||||
ZEND_END_ARG_INFO()
|
||||
#define arginfo_preg_match_all arginfo_preg_match
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL)
|
||||
ZEND_ARG_TYPE_MASK(0, pattern, MAY_BE_STRING|MAY_BE_ARRAY, NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue