summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2019-11-08 23:29:12 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2019-11-11 14:54:55 +0100
commit27e83d0fb87c04b61441fb77e963dd4e14ad187e (patch)
tree1b35b21c48c54f353e643d29dd2306d8e1ba084a
parent2804ea612779b89d3c62d974eb35783dd31f7dee (diff)
downloadphp-git-27e83d0fb87c04b61441fb77e963dd4e14ad187e.tar.gz
Add union return types for function stubs
-rw-r--r--Zend/zend_builtin_functions.stub.php21
-rw-r--r--Zend/zend_builtin_functions_arginfo.h15
-rw-r--r--Zend/zend_generators_arginfo.h12
-rw-r--r--ext/bcmath/bcmath.stub.php3
-rw-r--r--ext/bcmath/bcmath_arginfo.h2
-rw-r--r--ext/bz2/bz2.stub.php34
-rw-r--r--ext/bz2/bz2_arginfo.h8
-rw-r--r--ext/calendar/calendar.stub.php6
-rw-r--r--ext/calendar/calendar_arginfo.h4
-rw-r--r--ext/com_dotnet/com_extension.stub.php3
-rw-r--r--ext/com_dotnet/com_extension_arginfo.h2
-rw-r--r--ext/curl/curl.stub.php44
-rw-r--r--ext/curl/curl_arginfo.h10
-rw-r--r--ext/date/php_date.stub.php42
-rw-r--r--ext/date/php_date_arginfo.h65
-rw-r--r--ext/dba/dba.stub.php20
-rw-r--r--ext/dba/dba_arginfo.h6
-rw-r--r--ext/enchant/enchant.stub.php14
-rw-r--r--ext/enchant/enchant_arginfo.h4
-rw-r--r--ext/exif/exif.stub.php12
-rw-r--r--ext/exif/exif_arginfo.h8
-rw-r--r--ext/fileinfo/fileinfo.stub.php9
-rw-r--r--ext/fileinfo/fileinfo_arginfo.h6
-rw-r--r--ext/filter/filter.stub.php5
-rw-r--r--ext/filter/filter_arginfo.h2
-rw-r--r--ext/ftp/ftp.stub.php71
-rw-r--r--ext/ftp/ftp_arginfo.h23
-rw-r--r--ext/gd/gd.stub.php53
-rw-r--r--ext/gd/gd_arginfo.h32
-rw-r--r--ext/gettext/gettext.stub.php27
-rw-r--r--ext/gettext/gettext_arginfo.h18
-rw-r--r--ext/gmp/gmp.stub.php87
-rw-r--r--ext/gmp/gmp_arginfo.h52
-rw-r--r--ext/hash/hash.stub.php25
-rw-r--r--ext/hash/hash_arginfo.h16
-rw-r--r--ext/iconv/iconv.stub.php27
-rw-r--r--ext/iconv/iconv_arginfo.h18
-rw-r--r--ext/imap/php_imap.stub.php222
-rw-r--r--ext/imap/php_imap_arginfo.h61
-rw-r--r--ext/intl/timezone/timezone.stub.php39
-rw-r--r--ext/intl/timezone/timezone_arginfo.h44
-rw-r--r--ext/json/json.stub.php3
-rw-r--r--ext/json/json_arginfo.h2
-rw-r--r--ext/ldap/ldap.stub.php75
-rw-r--r--ext/ldap/ldap_arginfo.h25
-rw-r--r--ext/mbstring/mbstring.stub.php159
-rw-r--r--ext/mbstring/mbstring_arginfo.h77
-rw-r--r--ext/odbc/odbc.stub.php87
-rw-r--r--ext/odbc/odbc_arginfo.h30
-rw-r--r--ext/opcache/opcache.stub.php6
-rw-r--r--ext/opcache/opcache_arginfo.h4
-rw-r--r--ext/openssl/openssl.stub.php81
-rw-r--r--ext/openssl/openssl_arginfo.h45
-rw-r--r--ext/pcntl/pcntl.stub.php19
-rw-r--r--ext/pcntl/pcntl_arginfo.h8
-rw-r--r--ext/pcre/php_pcre.stub.php31
-rw-r--r--ext/pcre/php_pcre_arginfo.h20
-rw-r--r--ext/posix/posix.stub.php44
-rw-r--r--ext/posix/posix_arginfo.h27
-rw-r--r--ext/pspell/pspell.stub.php12
-rw-r--r--ext/pspell/pspell_arginfo.h8
-rw-r--r--ext/readline/readline.stub.php3
-rw-r--r--ext/readline/readline_arginfo.h2
-rw-r--r--ext/session/session.stub.php27
-rw-r--r--ext/session/session_arginfo.h24
-rw-r--r--ext/shmop/shmop.stub.php26
-rw-r--r--ext/shmop/shmop_arginfo.h4
-rw-r--r--ext/snmp/snmp.stub.php100
-rw-r--r--ext/snmp/snmp_arginfo.h8
-rw-r--r--ext/sockets/sockets.stub.php97
-rw-r--r--ext/sockets/sockets_arginfo.h26
-rw-r--r--ext/sodium/libsodium.stub.php27
-rw-r--r--ext/sodium/libsodium_arginfo.h14
-rwxr-xr-xext/standard/basic_functions.stub.php341
-rwxr-xr-xext/standard/basic_functions_arginfo.h202
-rw-r--r--ext/sysvmsg/sysvmsg.stub.php7
-rw-r--r--ext/sysvmsg/sysvmsg_arginfo.h2
-rw-r--r--ext/tidy/tidy.stub.php23
-rw-r--r--ext/tidy/tidy_arginfo.h10
-rw-r--r--ext/tokenizer/tokenizer.stub.php3
-rw-r--r--ext/tokenizer/tokenizer_arginfo.h2
-rw-r--r--ext/xmlwriter/xmlwriter.stub.php3
-rw-r--r--ext/xmlwriter/xmlwriter_arginfo.h2
-rw-r--r--ext/zip/php_zip.stub.php35
-rw-r--r--ext/zip/php_zip_arginfo.h10
-rw-r--r--ext/zlib/zlib.stub.php124
-rw-r--r--ext/zlib/zlib_arginfo.h35
-rw-r--r--sapi/cli/tests/006.phpt8
-rw-r--r--sapi/phpdbg/phpdbg.stub.php3
-rw-r--r--sapi/phpdbg/phpdbg_arginfo.h2
-rwxr-xr-xscripts/dev/gen_stub.php2
91 files changed, 1198 insertions, 1909 deletions
diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php
index c3052db108..57c3f5830c 100644
--- a/Zend/zend_builtin_functions.stub.php
+++ b/Zend/zend_builtin_functions.stub.php
@@ -7,15 +7,13 @@ function func_num_args(): int {}
/** @return mixed */
function func_get_arg(int $arg_num) {}
-/** @return array|false */
-function func_get_args() {}
+function func_get_args(): array|false {}
function strlen(string $str): int {}
function strcmp(string $str1, string $str2): int {}
-/** @return int|false */
-function strncmp(string $str1, string $str2, int $len) {}
+function strncmp(string $str1, string $str2, int $len): int|false {}
function error_reporting($new_error_level = UNKNOWN): int {}
@@ -23,21 +21,17 @@ function define(string $constant_name, $value, bool $case_insensitive = false):
function defined(string $constant_name): bool {}
-/** @return string|false */
-function get_class(object $object = UNKNOWN) {}
+function get_class(object $object = UNKNOWN): string|false {}
-/** @return string|false */
-function get_called_class() {}
+function get_called_class(): string|false {}
-/** @return string|false */
-function get_parent_class($object = UNKNOWN) {}
+function get_parent_class($object = UNKNOWN): string|false {}
function is_subclass_of($object, string $class_name, bool $allow_string = true): bool {}
function is_a($object, string $class_name, bool $allow_string = false): bool {}
-/** @return array|false */
-function get_class_vars(string $class_name) {}
+function get_class_vars(string $class_name): array|false {}
function get_object_vars(object $obj): array {}
@@ -103,8 +97,7 @@ function debug_print_backtrace(int $options = 0, int $limit = 0): void {}
function extension_loaded(string $extension_name): bool {}
-/** @return array|false */
-function get_extension_funcs(string $extension_name) {}
+function get_extension_funcs(string $extension_name): array|false {}
#if ZEND_DEBUG && defined(ZTS)
function zend_thread_id(): int {}
diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h
index 750b0aa219..bfe5b82a8a 100644
--- a/Zend/zend_builtin_functions_arginfo.h
+++ b/Zend/zend_builtin_functions_arginfo.h
@@ -10,7 +10,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_func_get_arg, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, arg_num, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_func_get_args, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_func_get_args, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strlen, 0, 1, IS_LONG, 0)
@@ -22,7 +22,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strcmp, 0, 2, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_strncmp, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strncmp, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0)
@@ -42,13 +42,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_defined, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, constant_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_class, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_class, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
ZEND_END_ARG_INFO()
-#define arginfo_get_called_class arginfo_func_get_args
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_called_class, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_parent_class, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_parent_class, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, object)
ZEND_END_ARG_INFO()
@@ -60,7 +61,7 @@ ZEND_END_ARG_INFO()
#define arginfo_is_a arginfo_is_subclass_of
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_class_vars, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_class_vars, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, class_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -175,7 +176,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_extension_loaded, 0, 1, _IS_BOOL
ZEND_ARG_TYPE_INFO(0, extension_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_extension_funcs, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_extension_funcs, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, extension_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/Zend/zend_generators_arginfo.h b/Zend/zend_generators_arginfo.h
index 56d4ddeccf..a65d6b1b12 100644
--- a/Zend/zend_generators_arginfo.h
+++ b/Zend/zend_generators_arginfo.h
@@ -1,13 +1,15 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Generator_rewind, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Generator_rewind, 0, 0, IS_VOID, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_Generator_valid arginfo_class_Generator_rewind
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Generator_valid, 0, 0, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_class_Generator_current arginfo_class_Generator_rewind
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Generator_current, 0, 0, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_class_Generator_key arginfo_class_Generator_rewind
+#define arginfo_class_Generator_key arginfo_class_Generator_current
#define arginfo_class_Generator_next arginfo_class_Generator_rewind
@@ -19,4 +21,4 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Generator_throw, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, exception, Throwable, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_Generator_getReturn arginfo_class_Generator_rewind
+#define arginfo_class_Generator_getReturn arginfo_class_Generator_current
diff --git a/ext/bcmath/bcmath.stub.php b/ext/bcmath/bcmath.stub.php
index 274759b8a6..5f59487f41 100644
--- a/ext/bcmath/bcmath.stub.php
+++ b/ext/bcmath/bcmath.stub.php
@@ -10,8 +10,7 @@ function bcdiv(string $dividend, string $divisor, int $scale = UNKNOWN) : string
function bcmod(string $dividend, string $divisor, int $scale = UNKNOWN) : string {}
-/** @return string|false */
-function bcpowmod(string $base, string $exponent, string $modulus, int $scale = UNKNOWN) {}
+function bcpowmod(string $base, string $exponent, string $modulus, int $scale = UNKNOWN): string|false {}
function bcpow(string $base, string $exponent, int $scale = UNKNOWN) : string {}
diff --git a/ext/bcmath/bcmath_arginfo.h b/ext/bcmath/bcmath_arginfo.h
index 2d2117acaa..dd246518dc 100644
--- a/ext/bcmath/bcmath_arginfo.h
+++ b/ext/bcmath/bcmath_arginfo.h
@@ -18,7 +18,7 @@ ZEND_END_ARG_INFO()
#define arginfo_bcmod arginfo_bcdiv
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bcpowmod, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bcpowmod, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, base, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, exponent, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, modulus, IS_STRING, 0)
diff --git a/ext/bz2/bz2.stub.php b/ext/bz2/bz2.stub.php
index f90d66c168..b4898481d0 100644
--- a/ext/bz2/bz2.stub.php
+++ b/ext/bz2/bz2.stub.php
@@ -6,49 +6,37 @@
*/
function bzopen($file, string $mode) {}
-/**
- * @param resource $bz
- * @return string|false
- */
-function bzread ($bz, int $length = 1024) {}
+/** @param resource $bz */
+function bzread($bz, int $length = 1024): string|false {}
-/**
- * @param resource $bz
- * @return int|false
- */
-function bzwrite ($bz, string $str, int $length = UNKNOWN) {}
+/** @param resource $bz */
+function bzwrite($bz, string $str, int $length = UNKNOWN): int|false {}
/**
* @param resource $bz
*/
-function bzflush ($bz): bool {}
+function bzflush($bz): bool {}
/**
* @param resource $bz
*/
-function bzclose ($bz): bool {}
+function bzclose($bz): bool {}
/**
* @param resource $bz
*/
-function bzerrno ($bz): int {}
+function bzerrno($bz): int {}
/**
* @param resource $bz
*/
-function bzerrstr ($bz): string {}
+function bzerrstr($bz): string {}
/**
* @param resource $bz
*/
-function bzerror ($bz): array {}
+function bzerror($bz): array {}
-/**
- * @return string|int
- */
-function bzcompress (string $source, int $blocksize = 4, int $workfactor = 0) {}
+function bzcompress(string $source, int $blocksize = 4, int $workfactor = 0): string|int {}
-/**
- * @return string|int
- */
-function bzdecompress (string $source, int $small = 0) {}
+function bzdecompress(string $source, int $small = 0): string|int|false {}
diff --git a/ext/bz2/bz2_arginfo.h b/ext/bz2/bz2_arginfo.h
index be89a095e8..5010a959a3 100644
--- a/ext/bz2/bz2_arginfo.h
+++ b/ext/bz2/bz2_arginfo.h
@@ -5,12 +5,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_bzopen, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bzread, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzread, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, bz)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bzwrite, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, bz)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
@@ -34,13 +34,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bzerror, 0, 1, IS_ARRAY, 0)
ZEND_ARG_INFO(0, bz)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bzcompress, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzcompress, 0, 1, MAY_BE_STRING|MAY_BE_LONG)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, blocksize, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, workfactor, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bzdecompress, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bzdecompress, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, small, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/calendar/calendar.stub.php b/ext/calendar/calendar.stub.php
index 888986a708..88b5b5fe39 100644
--- a/ext/calendar/calendar.stub.php
+++ b/ext/calendar/calendar.stub.php
@@ -16,8 +16,7 @@ function frenchtojd(int $month, int $day, int $year): int {}
function gregoriantojd(int $month, int $day, int $year): int {}
-/** @return int|string */
-function jddayofweek(int $juliandaycount, int $mode = CAL_DOW_DAYNO) {}
+function jddayofweek(int $juliandaycount, int $mode = CAL_DOW_DAYNO): int|string {}
function jdmonthname(int $juliandaycount, int $mode): string {}
@@ -35,5 +34,4 @@ function jewishtojd(int $month, int $day, int $year): int {}
function juliantojd(int $month, int $day, int $year): int {}
-/** @return int|false */
-function unixtojd(int $timestamp = UNKNOWN) {}
+function unixtojd(int $timestamp = UNKNOWN): int|false {}
diff --git a/ext/calendar/calendar_arginfo.h b/ext/calendar/calendar_arginfo.h
index a03ef6778b..ab0064d016 100644
--- a/ext/calendar/calendar_arginfo.h
+++ b/ext/calendar/calendar_arginfo.h
@@ -37,7 +37,7 @@ ZEND_END_ARG_INFO()
#define arginfo_gregoriantojd arginfo_frenchtojd
-ZEND_BEGIN_ARG_INFO_EX(arginfo_jddayofweek, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_jddayofweek, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, juliandaycount, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -69,6 +69,6 @@ ZEND_END_ARG_INFO()
#define arginfo_juliantojd arginfo_frenchtojd
-ZEND_BEGIN_ARG_INFO_EX(arginfo_unixtojd, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unixtojd, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/com_dotnet/com_extension.stub.php b/ext/com_dotnet/com_extension.stub.php
index 34ff543297..83cfc50350 100644
--- a/ext/com_dotnet/com_extension.stub.php
+++ b/ext/com_dotnet/com_extension.stub.php
@@ -55,8 +55,7 @@ function variant_cast(variant $variant, int $type): variant {}
function com_get_active_object(string $progid, int $code_page = UNKNOWN): variant {}
-/** @return string|false */
-function com_create_guid() {}
+function com_create_guid(): string|false {}
function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = UNKNOWN): bool {}
diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h
index b2f7d0a09c..b8ffef8077 100644
--- a/ext/com_dotnet/com_extension_arginfo.h
+++ b/ext/com_dotnet/com_extension_arginfo.h
@@ -85,7 +85,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_com_get_active_object, 0, 1, vari
ZEND_ARG_TYPE_INFO(0, code_page, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_com_create_guid, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_com_create_guid, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_event_sink, 0, 2, _IS_BOOL, 0)
diff --git a/ext/curl/curl.stub.php b/ext/curl/curl.stub.php
index 022438d0b2..4d9f3ad049 100644
--- a/ext/curl/curl.stub.php
+++ b/ext/curl/curl.stub.php
@@ -5,7 +5,6 @@ function curl_close($handle): void {}
/**
* @param resource $handle
- *
* @return resource|false
*/
function curl_copy_handle($handle) {}
@@ -16,19 +15,11 @@ function curl_errno($handle): int {}
/** @param resource $handle */
function curl_error($handle): string {}
-/**
- * @param resource $handle
- *
- * @return string|false
- */
-function curl_escape($handle, string $string) {}
+/** @param resource $handle */
+function curl_escape($handle, string $string): string|false {}
-/**
- * @param resource $handle
- *
- * @return string|bool
- */
-function curl_exec($handle) {}
+/** @param resource $handle */
+function curl_exec($handle): string|bool {}
function curl_file_create(
string $filename,
@@ -38,14 +29,12 @@ function curl_file_create(
/**
* @param resource $handle
- *
* @return mixed
*/
function curl_getinfo($handle, int $option = UNKNOWN) {}
/**
* @param resource $handle
- *
* @return resource|false
*/
function curl_init(string $url = UNKNOWN) {}
@@ -59,11 +48,7 @@ function curl_multi_add_handle($multi_handle, $handle): int {}
/** @param resource $multi_handle */
function curl_multi_close($multi_handle): void {}
-/**
- * @param resource $multi_handle
- *
- * @return int|false
- */
+/** @param resource $multi_handle */
function curl_multi_errno($multi_handle): int {}
/** @param resource $multi_handle */
@@ -72,12 +57,8 @@ function curl_multi_exec($multi_handle, &$still_running): int {}
/** @param resource $multi_handle */
function curl_multi_getcontent($multi_handle): ?string {}
-/**
- * @param resource $multi_handle
- *
- * @return array|false
- */
-function curl_multi_info_read($multi_handle, &$msgs_in_queue = null) {}
+/** @param resource $multi_handle */
+function curl_multi_info_read($multi_handle, &$msgs_in_queue = null): array|false {}
/** @return resource */
function curl_multi_init() {}
@@ -136,12 +117,7 @@ function curl_share_strerror(int $error_number): ?string {}
function curl_strerror(int $error_number): ?string {}
-/**
- * @param resource $handle
- *
- * @return string|false
- */
-function curl_unescape($handle, string $string) {}
+/** @param resource $handle */
+function curl_unescape($handle, string $string): string|false {}
-/** @return array|false */
-function curl_version(int $age = UNKNOWN) {}
+function curl_version(int $age = UNKNOWN): array|false {}
diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h
index 561c0a7684..a7ae7a071b 100644
--- a/ext/curl/curl_arginfo.h
+++ b/ext/curl/curl_arginfo.h
@@ -16,12 +16,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_error, 0, 1, IS_STRING, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_escape, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_escape, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, handle)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_curl_exec arginfo_curl_copy_handle
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_exec, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
+ ZEND_ARG_INFO(0, handle)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_curl_file_create, 0, 1, CURLFile, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -60,7 +62,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_getcontent, 0, 1, IS_
ZEND_ARG_INFO(0, multi_handle)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_info_read, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_multi_info_read, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, multi_handle)
ZEND_ARG_INFO(1, msgs_in_queue)
ZEND_END_ARG_INFO()
@@ -127,6 +129,6 @@ ZEND_END_ARG_INFO()
#define arginfo_curl_unescape arginfo_curl_escape
-ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_version, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_version, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, age, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php
index 840efd19c7..13d301ee9f 100644
--- a/ext/date/php_date.stub.php
+++ b/ext/date/php_date.stub.php
@@ -3,33 +3,27 @@
/* TODO: Convert "uninitialized" into an exception. This will remove many
* possibilities for false return values in here. */
-/** @return int|false */
-function strtotime(string $time, int $now = UNKNOWN) {}
+function strtotime(string $time, int $now = UNKNOWN): int|false {}
function date(string $format, int $timestamp = UNKNOWN): string {}
-/** @return int|false */
-function idate(string $format, int $timestamp = UNKNOWN) {}
+function idate(string $format, int $timestamp = UNKNOWN): int|false {}
function gmdate(string $format, int $timestamp = UNKNOWN): string {}
-/** @return int|false */
function mktime(
int $hour, int $min = UNKNOWN, int $sec = UNKNOWN,
- int $mon = UNKNOWN, int $day = UNKNOWN, int $year = UNKNOWN) {}
+ int $mon = UNKNOWN, int $day = UNKNOWN, int $year = UNKNOWN): int|false {}
-/** @return int|false */
function gmmktime(
int $hour, int $min = UNKNOWN, int $sec = UNKNOWN,
- int $mon = UNKNOWN, int $day = UNKNOWN, int $year = UNKNOWN) {}
+ int $mon = UNKNOWN, int $day = UNKNOWN, int $year = UNKNOWN): int|false {}
function checkdate(int $m, int $d, int $y): bool {}
-/** @return string|false */
-function strftime(string $format, int $timestamp = UNKNOWN) {}
+function strftime(string $format, int $timestamp = UNKNOWN): string|false {}
-/** @return string|false */
-function gmstrftime(string $format, int $timestamp = UNKNOWN) {}
+function gmstrftime(string $format, int $timestamp = UNKNOWN): string|false {}
function time(): int {}
@@ -54,8 +48,7 @@ function date_parse(string $date): array {}
function date_parse_from_format(string $format, string $date): array {}
-/** @return array|false */
-function date_get_last_errors() {}
+function date_get_last_errors(): array|false {}
function date_format(DateTimeInterface $object, string $format): string {}
@@ -85,28 +78,23 @@ function date_isodate_set(DateTime $object, int $year, int $week, int $day = 1):
function date_timestamp_set(DateTime $object, int $timestamp): DateTime {}
-/** @return int|false */
-function date_timestamp_get(DateTimeInterface $object) {}
+function date_timestamp_get(DateTimeInterface $object): int|false {}
/** @return DateTimeZone|false */
function timezone_open(string $timezone) {}
function timezone_name_get(DateTimeZone $object): string {}
-/** @return string|false */
-function timezone_name_from_abbr(string $abbr, int $gmtoffset = -1, int $isdst = -1) {}
+function timezone_name_from_abbr(string $abbr, int $gmtoffset = -1, int $isdst = -1): string|false {}
function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime): int {}
-/** @return array|false */
function timezone_transitions_get(
- DateTimeZone $object, int $timestamp_begin = PHP_INT_MIN, int $timestamp_end = PHP_INT_MAX) {}
+ DateTimeZone $object, int $timestamp_begin = PHP_INT_MIN, int $timestamp_end = PHP_INT_MAX): array|false {}
-/** @return array|false */
-function timezone_location_get(DateTimeZone $object) {}
+function timezone_location_get(DateTimeZone $object): array|false {}
-/** @return array|false */
-function timezone_identifiers_list(int $what = DateTimeZone::ALL, ?string $country = null) {}
+function timezone_identifiers_list(int $what = DateTimeZone::ALL, ?string $country = null): array|false {}
function timezone_abbreviations_list(): array {}
@@ -121,17 +109,15 @@ function date_default_timezone_set(string $timezone_identifier): bool {}
function date_default_timezone_get(): string {}
-/** @return string|int|float|false */
function date_sunrise(
int $time, int $retformat = SUNFUNCS_RET_STRING,
float $latitude = UNKNOWN, float $longitude = UNKNOWN, float $zenith = UNKNOWN,
- float $gmt_offset = 0) {}
+ float $gmt_offset = 0): string|int|float|false {}
-/** @return string|int|float|false */
function date_sunset(
int $time, int $retformat = SUNFUNCS_RET_STRING,
float $latitude = UNKNOWN, float $longitude = UNKNOWN, float $zenith = UNKNOWN,
- float $gmt_offset = 0) {}
+ float $gmt_offset = 0): string|int|float|false {}
function date_sun_info(int $time, float $latitude, float $longitude): array {}
diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h
index 57832f005e..7f8edb79e9 100644
--- a/ext/date/php_date_arginfo.h
+++ b/ext/date/php_date_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_strtotime, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, now, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -10,14 +10,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_idate, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_idate, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
ZEND_END_ARG_INFO()
#define arginfo_gmdate arginfo_date
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mktime, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mktime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, sec, IS_LONG, 0)
@@ -34,9 +34,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_checkdate, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_strftime arginfo_idate
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strftime, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_gmstrftime arginfo_idate
+#define arginfo_gmstrftime arginfo_strftime
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_time, 0, 0, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -74,7 +77,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_parse_from_format, 0, 2, IS
ZEND_ARG_TYPE_INFO(0, date, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_date_get_last_errors, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_get_last_errors, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_format, 0, 2, IS_STRING, 0)
@@ -140,7 +143,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_timestamp_set, 0, 2, DateTim
ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_date_timestamp_get arginfo_date_timezone_get
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_timestamp_get, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_open, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0)
@@ -150,7 +155,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timezone_name_get, 0, 1, IS_STRI
ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_name_from_abbr, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_name_from_abbr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, abbr, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, gmtoffset, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, isdst, IS_LONG, 0)
@@ -161,17 +166,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timezone_offset_get, 0, 2, IS_LO
ZEND_ARG_OBJ_INFO(0, datetime, DateTimeInterface, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_transitions_get, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_transitions_get, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 0)
ZEND_ARG_TYPE_INFO(0, timestamp_begin, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, timestamp_end, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_location_get, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_location_get, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_identifiers_list, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_timezone_identifiers_list, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, country, IS_STRING, 1)
ZEND_END_ARG_INFO()
@@ -197,7 +202,7 @@ ZEND_END_ARG_INFO()
#define arginfo_date_default_timezone_get arginfo_timezone_version_get
-ZEND_BEGIN_ARG_INFO_EX(arginfo_date_sunrise, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_sunrise, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, retformat, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, latitude, IS_DOUBLE, 0)
@@ -218,18 +223,19 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeInterface_format, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_DateTimeInterface_getTimezone arginfo_date_get_last_errors
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeInterface_getTimezone, 0, 0, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_class_DateTimeInterface_getOffset arginfo_date_get_last_errors
+#define arginfo_class_DateTimeInterface_getOffset arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DateTimeInterface_getTimestamp arginfo_date_get_last_errors
+#define arginfo_class_DateTimeInterface_getTimestamp arginfo_class_DateTimeInterface_getTimezone
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeInterface_diff, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0)
ZEND_ARG_TYPE_INFO(0, absolute, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_DateTimeInterface___wakeup arginfo_date_get_last_errors
+#define arginfo_class_DateTimeInterface___wakeup arginfo_class_DateTimeInterface_getTimezone
#define arginfo_class_DateTime___construct arginfo_date_create
@@ -243,7 +249,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_DateTime_createFromFormat arginfo_date_create_from_format
-#define arginfo_class_DateTime_getLastErrors arginfo_date_get_last_errors
+#define arginfo_class_DateTime_getLastErrors arginfo_class_DateTimeInterface_getTimezone
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_modify, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, modify, IS_STRING, 0)
@@ -308,7 +314,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_DateTimeZone___construct arginfo_timezone_open
-#define arginfo_class_DateTimeZone_getName arginfo_date_get_last_errors
+#define arginfo_class_DateTimeZone_getName arginfo_class_DateTimeInterface_getTimezone
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone_getOffset, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, datetime, DateTimeInterface, 0)
@@ -319,13 +325,16 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone_getTransitions, 0, 0, 0)
ZEND_ARG_TYPE_INFO(0, timestamp_end, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_DateTimeZone_getLocation arginfo_date_get_last_errors
+#define arginfo_class_DateTimeZone_getLocation arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DateTimeZone_listAbbreviations arginfo_date_get_last_errors
+#define arginfo_class_DateTimeZone_listAbbreviations arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DateTimeZone_listIdentifiers arginfo_timezone_identifiers_list
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTimeZone_listIdentifiers, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, country, IS_STRING, 1)
+ZEND_END_ARG_INFO()
-#define arginfo_class_DateTimeZone___wakeup arginfo_date_get_last_errors
+#define arginfo_class_DateTimeZone___wakeup arginfo_class_DateTimeInterface_getTimezone
#define arginfo_class_DateTimeZone___set_state arginfo_class_DateTime___set_state
@@ -337,7 +346,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_DateInterval_format arginfo_class_DateTimeInterface_format
-#define arginfo_class_DateInterval___wakeup arginfo_date_get_last_errors
+#define arginfo_class_DateInterval___wakeup arginfo_class_DateTimeInterface_getTimezone
#define arginfo_class_DateInterval___set_state arginfo_class_DateTime___set_state
@@ -347,14 +356,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DatePeriod___construct, 0, 0, 1)
ZEND_ARG_INFO(0, end)
ZEND_END_ARG_INFO()
-#define arginfo_class_DatePeriod_getStartDate arginfo_date_get_last_errors
+#define arginfo_class_DatePeriod_getStartDate arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DatePeriod_getEndDate arginfo_date_get_last_errors
+#define arginfo_class_DatePeriod_getEndDate arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DatePeriod_getDateInterval arginfo_date_get_last_errors
+#define arginfo_class_DatePeriod_getDateInterval arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DatePeriod_getRecurrences arginfo_date_get_last_errors
+#define arginfo_class_DatePeriod_getRecurrences arginfo_class_DateTimeInterface_getTimezone
-#define arginfo_class_DatePeriod___wakeup arginfo_date_get_last_errors
+#define arginfo_class_DatePeriod___wakeup arginfo_class_DateTimeInterface_getTimezone
#define arginfo_class_DatePeriod___set_state arginfo_class_DateTime___set_state
diff --git a/ext/dba/dba.stub.php b/ext/dba/dba.stub.php
index 80b82259fc..96ce6d573a 100644
--- a/ext/dba/dba.stub.php
+++ b/ext/dba/dba.stub.php
@@ -19,24 +19,16 @@ function dba_exists($key, $handle): bool {}
* @param string|array $key
* @param int|resource $skip actually this parameter is optional, not $handle
* @param resource $handle
- * @return string|false
*/
-function dba_fetch($key, $skip, $handle = UNKOWN) {}
+function dba_fetch($key, $skip, $handle = UNKOWN): string|false {}
-/** @return array|false */
-function dba_key_split(string $key) {}
+function dba_key_split(string $key): array|false {}
-/**
- * @param resource $handle
- * @return string|false
- */
-function dba_firstkey($handle) {}
+/** @param resource $handle */
+function dba_firstkey($handle): string|false {}
-/**
- * @param resource $handle
- * @return string|false
- */
-function dba_nextkey($handle) {}
+/** @param resource $handle */
+function dba_nextkey($handle): string|false {}
/**
* @param string|array $key
diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h
index d5ac0683f8..32e925fb6a 100644
--- a/ext/dba/dba_arginfo.h
+++ b/ext/dba/dba_arginfo.h
@@ -18,17 +18,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_exists, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_fetch, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_fetch, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, skip)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_key_split, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_key_split, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_firstkey, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_firstkey, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
diff --git a/ext/enchant/enchant.stub.php b/ext/enchant/enchant.stub.php
index 71f0e81715..22533b9b82 100644
--- a/ext/enchant/enchant.stub.php
+++ b/ext/enchant/enchant.stub.php
@@ -15,11 +15,8 @@ function enchant_broker_get_error($broker) {}
/** @param resource $broker */
function enchant_broker_set_dict_path($broker, int $name, string $value): bool {}
-/**
- * @param resource $broker
- * @return string|false
- */
-function enchant_broker_get_dict_path($broker, int $name) {}
+/** @param resource $broker */
+function enchant_broker_get_dict_path($broker, int $name): string|false {}
/** @param resource $broker */
function enchant_broker_list_dicts($broker): array {}
@@ -69,11 +66,8 @@ function enchant_dict_is_in_session($dict, string $word): bool {}
/** @param resource $dict */
function enchant_dict_store_replacement($dict, string $mis, string $cor): void {}
-/**
-* @param resource $dict
-* @return string|false
-*/
-function enchant_dict_get_error($dict) {}
+/** @param resource $dict */
+function enchant_dict_get_error($dict): string|false {}
/** @param resource $dict */
function enchant_dict_describe($dict): array {}
diff --git a/ext/enchant/enchant_arginfo.h b/ext/enchant/enchant_arginfo.h
index 488567651c..dae661d197 100644
--- a/ext/enchant/enchant_arginfo.h
+++ b/ext/enchant/enchant_arginfo.h
@@ -17,7 +17,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_broker_set_dict_path, 0,
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_enchant_broker_get_dict_path, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_enchant_broker_get_dict_path, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, broker)
ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -84,7 +84,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_store_replacement,
ZEND_ARG_TYPE_INFO(0, cor, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_enchant_dict_get_error, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_enchant_dict_get_error, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, dict)
ZEND_END_ARG_INFO()
diff --git a/ext/exif/exif.stub.php b/ext/exif/exif.stub.php
index a878c3c3ff..3fe2e72f66 100644
--- a/ext/exif/exif.stub.php
+++ b/ext/exif/exif.stub.php
@@ -1,13 +1,9 @@
<?php
-/** @return string|false */
-function exif_tagname(int $index) {}
+function exif_tagname(int $index): string|false {}
-/** @return array|false */
-function exif_read_data($filename, ?string $sections_needed = null, bool $sub_arrays = false, bool $read_thumbnail = false) {}
+function exif_read_data($filename, ?string $sections_needed = null, bool $sub_arrays = false, bool $read_thumbnail = false): array|false {}
-/** @return string|false */
-function exif_thumbnail($filename, &$width = null, &$height = null, &$imagetype = null) {}
+function exif_thumbnail($filename, &$width = null, &$height = null, &$imagetype = null): string|false {}
-/** @return int|false */
-function exif_imagetype(string $filename) {}
+function exif_imagetype(string $filename): int|false {}
diff --git a/ext/exif/exif_arginfo.h b/ext/exif/exif_arginfo.h
index 2e449deae1..2551e5e987 100644
--- a/ext/exif/exif_arginfo.h
+++ b/ext/exif/exif_arginfo.h
@@ -1,23 +1,23 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_exif_tagname, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_exif_read_data, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_read_data, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_TYPE_INFO(0, sections_needed, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, sub_arrays, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, read_thumbnail, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_exif_thumbnail, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_thumbnail, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(1, width)
ZEND_ARG_INFO(1, height)
ZEND_ARG_INFO(1, imagetype)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_exif_imagetype, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_imagetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/fileinfo/fileinfo.stub.php b/ext/fileinfo/fileinfo.stub.php
index 1b7a3b7562..f19b3163a7 100644
--- a/ext/fileinfo/fileinfo.stub.php
+++ b/ext/fileinfo/fileinfo.stub.php
@@ -36,19 +36,16 @@ function finfo_set_flags($finfo, int $options): bool {}
/**
* @param resource $finfo
* @param ?resource $context
- * @return string|false
*/
-function finfo_file($finfo, string $file_name, int $options = FILEINFO_NONE, $context = null) {}
+function finfo_file($finfo, string $file_name, int $options = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource $finfo
* @param ?resource $context
- * @return string|false
*/
-function finfo_buffer($finfo, string $string, int $options = FILEINFO_NONE, $context = null) {}
+function finfo_buffer($finfo, string $string, int $options = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|string $filename
- * @return string|false
*/
-function mime_content_type($filename) {}
+function mime_content_type($filename): string|false {}
diff --git a/ext/fileinfo/fileinfo_arginfo.h b/ext/fileinfo/fileinfo_arginfo.h
index b987d8a264..8f0f356bb0 100644
--- a/ext/fileinfo/fileinfo_arginfo.h
+++ b/ext/fileinfo/fileinfo_arginfo.h
@@ -32,20 +32,20 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_set_flags, 0, 2, _IS_BOOL,
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_finfo_file, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, finfo)
ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_ARG_INFO(0, context)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_finfo_buffer, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_buffer, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, finfo)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_ARG_INFO(0, context)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mime_content_type, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mime_content_type, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, filename)
ZEND_END_ARG_INFO()
diff --git a/ext/filter/filter.stub.php b/ext/filter/filter.stub.php
index a4b15cd4f9..31a7f2c3e6 100644
--- a/ext/filter/filter.stub.php
+++ b/ext/filter/filter.stub.php
@@ -29,7 +29,4 @@ function filter_var_array(array $data, $options = NULL, bool $add_empty = true)
function filter_list(): array {}
-/**
- * @return int|false
- */
-function filter_id(string $filtername) {}
+function filter_id(string $filtername): int|false {}
diff --git a/ext/filter/filter_arginfo.h b/ext/filter/filter_arginfo.h
index f5ed690ce7..0c2f590dce 100644
--- a/ext/filter/filter_arginfo.h
+++ b/ext/filter/filter_arginfo.h
@@ -33,6 +33,6 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_list, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_id, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filter_id, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/ftp/ftp.stub.php b/ext/ftp/ftp.stub.php
index 83a419e5a7..e01603a99c 100644
--- a/ext/ftp/ftp.stub.php
+++ b/ext/ftp/ftp.stub.php
@@ -11,17 +11,14 @@ function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90) {}
/** @param resource $ftp */
function ftp_login($ftp, string $username, string $password): bool {}
-/**
- * @param resource $ftp
- * @return string|false
- */
-function ftp_pwd($ftp) {}
+/** @param resource $ftp */
+function ftp_pwd($ftp): string|false {}
/** @param resource $ftp */
function ftp_cdup($ftp): bool {}
/** @param resource $ftp */
-function ftp_chdir($ftp, string $directory): bool {}
+function ftp_chdir($ftp, string $directory): bool {}
/** @param resource $ftp */
function ftp_exec($ftp, string $command): bool {}
@@ -29,47 +26,29 @@ function ftp_exec($ftp, string $command): bool {}
/** @param resource $ftp */
function ftp_raw($ftp, string $command): array {}
-/**
- * @param resource $ftp
- * @return string|false
- */
-function ftp_mkdir($ftp, string $directory) {}
+/** @param resource $ftp */
+function ftp_mkdir($ftp, string $directory): string|false {}
/** @param resource $ftp */
function ftp_rmdir($ftp, string $directory): bool {}
-/**
- * @param resource $ftp
- * @return int|false
- */
-function ftp_chmod($ftp, int $mode, string $filename) {}
+/** @param resource $ftp */
+function ftp_chmod($ftp, int $mode, string $filename): int|false {}
/** @param resource $ftp */
function ftp_alloc($ftp, int $size, &$response = UNKNOWN): bool {}
-/**
- * @param resource $ftp
- * @return array|false
- */
-function ftp_nlist($ftp, string $directory) {}
+/** @param resource $ftp */
+function ftp_nlist($ftp, string $directory): array|false {}
-/**
- * @param resource $ftp
- * @return array|false
- */
-function ftp_rawlist($ftp, string $directory, bool $recurse = false) {}
+/** @param resource $ftp */
+function ftp_rawlist($ftp, string $directory, bool $recurse = false): array|false {}
-/**
- * @param resource $ftp
- * @return array|false
- */
-function ftp_mlsd($ftp, string $directory) {}
+/** @param resource $ftp */
+function ftp_mlsd($ftp, string $directory): array|false {}
-/**
- * @param resource $ftp
- * @return string|false
- */
-function ftp_systype($ftp) {}
+/** @param resource $ftp */
+function ftp_systype($ftp): string|false {}
/**
* @param resource $ftp
@@ -80,9 +59,8 @@ function ftp_fget($ftp, $fp, string $remote_file, int $mode = FTP_BINARY, int $r
/**
* @param resource $ftp
* @param resource $fp
- * @return int|false
*/
-function ftp_nb_fget($ftp, $fp, string $remote_file, int $mode = FTP_BINARY, int $resumpos = 0) {}
+function ftp_nb_fget($ftp, $fp, string $remote_file, int $mode = FTP_BINARY, int $resumpos = 0): int|false {}
/** @param resource $ftp */
function ftp_pasv($ftp, bool $pasv): bool {}
@@ -105,9 +83,8 @@ function ftp_fput($ftp, string $remote_file, $fp, int $mode = FTP_BINARY, int $s
/**
* @param resource $ftp
* @param resource $fp
- * @return int|false
*/
-function ftp_nb_fput($ftp, string $remote_file, $fp, $mode = FTP_BINARY, $startpos = 0) {}
+function ftp_nb_fput($ftp, string $remote_file, $fp, $mode = FTP_BINARY, $startpos = 0): int|false {}
/** @param resource $ftp */
function ftp_put($ftp, string $remote_file, string $local_file, int $mode = FTP_BINARY, int $startpos = 0): bool {}
@@ -115,11 +92,8 @@ function ftp_put($ftp, string $remote_file, string $local_file, int $mode = FTP_
/** @param resource $ftp */
function ftp_append($ftp, string $remove_file, string $local_file, int $mode = FTP_BINARY): bool {}
-/**
- * @param resource $ftp
- * @return int|false
- */
-function ftp_nb_put($ftp, string $remote_file, string $local_file, int $mode = FTP_BINARY, int $startpos = 0) {}
+/** @param resource $ftp */
+function ftp_nb_put($ftp, string $remote_file, string $local_file, int $mode = FTP_BINARY, int $startpos = 0): int|false {}
/** @param resource $ftp */
function ftp_size($ftp, string $filename): int {}
@@ -142,8 +116,5 @@ function ftp_close($ftp): bool {}
/** @param resource $ftp */
function ftp_set_option($ftp, int $option, $value): bool {}
-/**
- * @param resource $ftp
- * @return int|bool
- */
-function ftp_get_option($ftp, int $option) {}
+/** @param resource $ftp */
+function ftp_get_option($ftp, int $option): int|bool {}
diff --git a/ext/ftp/ftp_arginfo.h b/ext/ftp/ftp_arginfo.h
index d55b76a686..69a3cd01e9 100644
--- a/ext/ftp/ftp_arginfo.h
+++ b/ext/ftp/ftp_arginfo.h
@@ -20,7 +20,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_login, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_pwd, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_pwd, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_END_ARG_INFO()
@@ -43,14 +43,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_raw, 0, 2, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, command, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_mkdir, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_mkdir, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_ftp_rmdir arginfo_ftp_chdir
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_chmod, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_chmod, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -62,15 +62,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_alloc, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(1, response)
ZEND_END_ARG_INFO()
-#define arginfo_ftp_nlist arginfo_ftp_mkdir
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nlist, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, ftp)
+ ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_rawlist, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_rawlist, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, recurse, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-#define arginfo_ftp_mlsd arginfo_ftp_mkdir
+#define arginfo_ftp_mlsd arginfo_ftp_nlist
#define arginfo_ftp_systype arginfo_ftp_pwd
@@ -82,7 +85,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_fget, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, resumepos, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_fget, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_fget, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_INFO(0, fp)
ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0)
@@ -123,7 +126,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_fput, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, startpos, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_fput, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_fput, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0)
ZEND_ARG_INFO(0, fp)
@@ -146,7 +149,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_append, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_put, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_nb_put, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, remote_file, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, local_file, IS_STRING, 0)
@@ -185,7 +188,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftp_set_option, 0, 3, _IS_BOOL,
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_get_option, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ftp_get_option, 0, 2, MAY_BE_LONG|MAY_BE_BOOL)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/gd/gd.stub.php b/ext/gd/gd.stub.php
index 7b639f9371..ae832648c0 100644
--- a/ext/gd/gd.stub.php
+++ b/ext/gd/gd.stub.php
@@ -2,8 +2,7 @@
function gd_info(): array {}
-/** @return int|false */
-function imageloadfont(string $filename) {}
+function imageloadfont(string $filename): int|false {}
function imagesetstyle($im, array $styles): bool {}
@@ -30,17 +29,13 @@ function imagesavealpha(GdImage $im, bool $save): bool {}
function imagelayereffect(GdImage $im, int $effect): bool {}
-/** @return int|false */
-function imagecolorallocatealpha(GdImage $im, int $red, int $green, int $blue, int $alpha) {}
+function imagecolorallocatealpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
-/** @return int|false */
-function imagecolorresolvealpha(GdImage $im, int $red, int $green, int $blue, int $alpha) {}
+function imagecolorresolvealpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
-/** @return int|false */
-function imagecolorclosestalpha(GdImage $im, int $red, int $green, int $blue, int $alpha) {}
+function imagecolorclosestalpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
-/** @return int|false */
-function imagecolorexactalpha(GdImage $im, int $red, int $green, int $blue, int $alpha) {}
+function imagecolorexactalpha(GdImage $im, int $red, int $green, int $blue, int $alpha): int|false {}
function imagecopyresampled(GdImage $dst_im, GdImage $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): bool {}
@@ -111,7 +106,7 @@ function imagecreatefromgd2part(string $filename, int $srcX, int $srcY, int $wid
/** @return GdImage|false */
function imagecreatefrombmp(string $filename) {}
#endif
-
+
#ifdef HAVE_GD_TGA
/** @return GdImage|false */
function imagecreatefromtga(string $filename) {}
@@ -145,33 +140,25 @@ function imagebmp(GdImage $im, $to = NULL, int $compressed = 1): bool {}
function imagedestroy(GdImage $im): bool {}
-/** @return int|false */
-function imagecolorallocate(GdImage $im, int $red, int $green, int $blue) {}
+function imagecolorallocate(GdImage $im, int $red, int $green, int $blue): int|false {}
function imagepalettecopy(GdImage $dst, GdImage $src): void {}
-/** @return int|false */
-function imagecolorat(GdImage $im, int $x, int $y) {}
+function imagecolorat(GdImage $im, int $x, int $y): int|false {}
-/** @return int|false */
-function imagecolorclosest(GdImage $im, int $red, int $green, int $blue) {}
+function imagecolorclosest(GdImage $im, int $red, int $green, int $blue): int|false {}
-/** @return int|false */
-function imagecolorclosesthwb(GdImage $im, int $red, int $green, int $blue) {}
+function imagecolorclosesthwb(GdImage $im, int $red, int $green, int $blue): int|false {}
function imagecolordeallocate(GdImage $im, int $index): bool {}
-/** @return int|false */
-function imagecolorresolve(GdImage $im, int $red, int $green, int $blue) {}
+function imagecolorresolve(GdImage $im, int $red, int $green, int $blue): int|false {}
-/** @return int|false */
-function imagecolorexact(GdImage $im, int $red, int $green, int $blue) {}
+function imagecolorexact(GdImage $im, int $red, int $green, int $blue): int|false {}
-/** @return ?false */
-function imagecolorset(GdImage $im, int $color, int $red, int $green, int $blue, int $alpha = 0) {}
+function imagecolorset(GdImage $im, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}
-/** @return array|false */
-function imagecolorsforindex(GdImage $im, int $index) {}
+function imagecolorsforindex(GdImage $im, int $index): array|false {}
function imagegammacorrect(GdImage $im, float $inputgamma, float $outputgamma): bool {}
@@ -234,8 +221,7 @@ function imagesetclip(GdImage $im, int $x1, int $x2, int $y1, int $y2): bool {}
function imagegetclip(GdImage $im): array {}
#ifdef HAVE_GD_FREETYPE
-/** @return array|false */
-function imageftbbox(float $size, float $angle, string $font_file, string $text, array $extrainfo = UNKNOWN) {}
+function imageftbbox(float $size, float $angle, string $font_file, string $text, array $extrainfo = UNKNOWN): array|false {}
function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = UNKNOWN) {}
@@ -264,13 +250,10 @@ function imagescale(GdImage $im, int $new_width, int $new_height = UNKNOWN, int
/** @return GdImage|false */
function imageaffine(GdImage $im, array $affine, array $clip = UNKNOWN) {}
-/** @return array|false */
-function imageaffinematrixget(int $type, $options = UNKNOWN) {}
+function imageaffinematrixget(int $type, $options = UNKNOWN): array|false {}
-/** @return array|false */
-function imageaffinematrixconcat(array $m1, array $m2) {}
+function imageaffinematrixconcat(array $m1, array $m2): array|false {}
function imagesetinterpolation(GdImage $im, int $method = IMG_BILENEAR_FIXED): bool {}
-/** @return array|true */
-function imageresolution(GdImage $im, int $res_x = UNKNOWN, int $res_y = UNKNOWN) {}
+function imageresolution(GdImage $im, int $res_x = UNKNOWN, int $res_y = UNKNOWN): array|bool {}
diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h
index 1f036c8ea9..aac01ed43f 100644
--- a/ext/gd/gd_arginfo.h
+++ b/ext/gd/gd_arginfo.h
@@ -3,7 +3,7 @@
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imageloadfont, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageloadfont, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -75,7 +75,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagelayereffect, 0, 2, _IS_BOOL
ZEND_ARG_TYPE_INFO(0, effect, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorallocatealpha, 0, 0, 5)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagecolorallocatealpha, 0, 5, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
ZEND_ARG_TYPE_INFO(0, red, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, green, IS_LONG, 0)
@@ -140,7 +140,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromstring, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, image, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_imagecreatefromgif arginfo_imageloadfont
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromgif, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
#if defined(HAVE_GD_JPG)
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromjpeg, 0, 0, 1)
@@ -160,7 +162,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromwebp, 0, 0, 1)
ZEND_END_ARG_INFO()
#endif
-#define arginfo_imagecreatefromxbm arginfo_imageloadfont
+#define arginfo_imagecreatefromxbm arginfo_imagecreatefromgif
#if defined(HAVE_GD_XPM)
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromxpm, 0, 0, 1)
@@ -168,11 +170,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromxpm, 0, 0, 1)
ZEND_END_ARG_INFO()
#endif
-#define arginfo_imagecreatefromwbmp arginfo_imageloadfont
+#define arginfo_imagecreatefromwbmp arginfo_imagecreatefromgif
-#define arginfo_imagecreatefromgd arginfo_imageloadfont
+#define arginfo_imagecreatefromgd arginfo_imagecreatefromgif
-#define arginfo_imagecreatefromgd2 arginfo_imageloadfont
+#define arginfo_imagecreatefromgd2 arginfo_imagecreatefromgif
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecreatefromgd2part, 0, 0, 5)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -255,7 +257,7 @@ ZEND_END_ARG_INFO()
#define arginfo_imagedestroy arginfo_imageistruecolor
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorallocate, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagecolorallocate, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
ZEND_ARG_TYPE_INFO(0, red, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, green, IS_LONG, 0)
@@ -267,7 +269,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagepalettecopy, 0, 2, IS_VOID,
ZEND_ARG_OBJ_INFO(0, src, GdImage, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorat, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagecolorat, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
ZEND_ARG_TYPE_INFO(0, x, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0)
@@ -286,7 +288,7 @@ ZEND_END_ARG_INFO()
#define arginfo_imagecolorexact arginfo_imagecolorallocate
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorset, 0, 0, 5)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagecolorset, 0, 5, _IS_BOOL, 1)
ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, red, IS_LONG, 0)
@@ -295,7 +297,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorset, 0, 0, 5)
ZEND_ARG_TYPE_INFO(0, alpha, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagecolorsforindex, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagecolorsforindex, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -448,7 +450,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegetclip, 0, 1, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_GD_FREETYPE)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imageftbbox, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageftbbox, 0, 4, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, size, IS_DOUBLE, 0)
ZEND_ARG_TYPE_INFO(0, angle, IS_DOUBLE, 0)
ZEND_ARG_TYPE_INFO(0, font_file, IS_STRING, 0)
@@ -544,12 +546,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imageaffine, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, clip, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imageaffinematrixget, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageaffinematrixget, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_ARG_INFO(0, options)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imageaffinematrixconcat, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageaffinematrixconcat, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, m1, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, m2, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
@@ -559,7 +561,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagesetinterpolation, 0, 1, _IS
ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imageresolution, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imageresolution, 0, 1, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
ZEND_ARG_TYPE_INFO(0, res_x, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, res_y, IS_LONG, 0)
diff --git a/ext/gettext/gettext.stub.php b/ext/gettext/gettext.stub.php
index a1c09d2bd9..16315f0033 100644
--- a/ext/gettext/gettext.stub.php
+++ b/ext/gettext/gettext.stub.php
@@ -1,36 +1,27 @@
<?php
-/** @return string|false */
-function textdomain(?string $domain) {}
+function textdomain(?string $domain): string|false {}
-/** @return string|false */
-function gettext(string $msgid) {}
+function gettext(string $msgid): string|false {}
-/** @return string|false */
-function dgettext(string $domain_name, string $msgid) {}
+function dgettext(string $domain_name, string $msgid): string|false {}
-/** @return string|false */
-function dcgettext(string $domain_name, string $msgid, int $category) {}
+function dcgettext(string $domain_name, string $msgid, int $category): string|false {}
-/** @return string|false */
-function bindtextdomain(string $domain_name, string $dir) {}
+function bindtextdomain(string $domain_name, string $dir): string|false {}
#if HAVE_NGETTEXT
-/** @return string|false */
-function ngettext(string $msgid1, string $msgid2, int $n) {}
+function ngettext(string $msgid1, string $msgid2, int $n): string|false {}
#endif
#if HAVE_DNGETTEXT
-/** @return string|false */
-function dngettext(string $domain, string $msgid1, string $msgid2, int $count) {}
+function dngettext(string $domain, string $msgid1, string $msgid2, int $count): string|false {}
#endif
#if HAVE_DCNGETTEXT
-/** @return string|false */
-function dcngettext(string $domain, string $msgid1, string $msgid2, int $count, int $category) {}
+function dcngettext(string $domain, string $msgid1, string $msgid2, int $count, int $category): string|false {}
#endif
#if HAVE_BIND_TEXTDOMAIN_CODESET
-/** @return string|false */
-function bind_textdomain_codeset(string $domain, string $codeset) {}
+function bind_textdomain_codeset(string $domain, string $codeset): string|false {}
#endif
diff --git a/ext/gettext/gettext_arginfo.h b/ext/gettext/gettext_arginfo.h
index ee248aafae..d3c4374b4a 100644
--- a/ext/gettext/gettext_arginfo.h
+++ b/ext/gettext/gettext_arginfo.h
@@ -1,31 +1,31 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_textdomain, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_textdomain, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gettext, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gettext, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dgettext, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dgettext, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dcgettext, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dcgettext, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, category, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bindtextdomain, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bindtextdomain, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, dir, IS_STRING, 0)
ZEND_END_ARG_INFO()
#if HAVE_NGETTEXT
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ngettext, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ngettext, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, n, IS_LONG, 0)
@@ -33,7 +33,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_DNGETTEXT
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dngettext, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dngettext, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0)
@@ -42,7 +42,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_DCNGETTEXT
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dcngettext, 0, 0, 5)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dcngettext, 0, 5, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0)
@@ -52,7 +52,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_BIND_TEXTDOMAIN_CODESET
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bind_textdomain_codeset, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bind_textdomain_codeset, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, codeset, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php
index 1102b0af95..e05fb4bf53 100644
--- a/ext/gmp/gmp.stub.php
+++ b/ext/gmp/gmp.stub.php
@@ -9,11 +9,8 @@ function gmp_init($number, int $base = 0) {}
/** @return GMP|false */
function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) {}
-/**
- * @param GMP|int|bool|string $gmpnumber
- * @return string|false
- */
-function gmp_export($gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) {}
+/** @param GMP|int|bool|string $gmpnumber */
+function gmp_export($gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string|false {}
/** @param GMP|int|bool|string $gmpnumber */
function gmp_intval($gmpnumber): int {}
@@ -48,9 +45,8 @@ function gmp_mul($a, $b) {}
/**
* @param GMP|int|bool|string $a
* @param GMP|int|bool|string $b
- * @return array|false
*/
-function gmp_div_qr($a, $b, int $round = GMP_ROUND_ZERO) {}
+function gmp_div_qr($a, $b, int $round = GMP_ROUND_ZERO): array|false {}
/**
* @param GMP|int|bool|string $a
@@ -111,11 +107,8 @@ function gmp_fact($a) {}
*/
function gmp_sqrt($a) {}
-/**
- * @param GMP|int|bool|string $a
- * @return array|false
- */
-function gmp_sqrtrem($a) {}
+/** @param GMP|int|bool|string $a */
+function gmp_sqrtrem($a): array|false {}
/**
* @param GMP|int|bool|string $a
@@ -123,11 +116,8 @@ function gmp_sqrtrem($a) {}
**/
function gmp_root($a, int $nth) {}
-/**
- * @param GMP|int|bool|string $a
- * @return array|false
- **/
-function gmp_rootrem($a, int $nth) {}
+/** @param GMP|int|bool|string $a **/
+function gmp_rootrem($a, int $nth): array|false {}
/**
* @param GMP|int|bool|string $base
@@ -149,11 +139,8 @@ function gmp_perfect_square($a): bool {}
/** @param GMP|int|bool|string $a **/
function gmp_perfect_power($a): bool {}
-/**
- * @param GMP|int|bool|string $a
- * @return int|false
- */
-function gmp_prob_prime($a, int $reps = 10) {}
+/** @param GMP|int|bool|string $a */
+function gmp_prob_prime($a, int $reps = 10): int|false {}
/**
* @param GMP|int|bool|string $a
@@ -186,42 +173,32 @@ function gmp_invert($a, $b) {}
/**
* @param GMP|int|bool|string $a
* @param GMP|int|bool|string $b
- * @return int|false
*/
-function gmp_jacobi($a, $b) {}
+function gmp_jacobi($a, $b): int|false {}
/**
* @param GMP|int|bool|string $a
* @param GMP|int|bool|string $b
- * @return int|false
*/
-function gmp_legendre($a, $b) {}
+function gmp_legendre($a, $b): int|false {}
/**
* @param GMP|int|bool|string $a
* @param GMP|int|bool|string $b
- * @return int|false
*/
-function gmp_kronecker($a, $b) {}
+function gmp_kronecker($a, $b): int|false {}
/**
* @param GMP|int|bool|string $a
* @param GMP|int|bool|string $b
- * @return int|false
*/
-function gmp_cmp($a, $b) {}
+function gmp_cmp($a, $b): int|false {}
-/**
- * @param GMP|int|bool|string $a
- * @return int|false
- */
-function gmp_sign($a) {}
+/** @param GMP|int|bool|string $a */
+function gmp_sign($a): int|false {}
-/**
- * @param GMP|int|bool|string $seed
- * @return null|false
- */
-function gmp_random_seed($seed) {}
+/** @param GMP|int|bool|string $seed */
+function gmp_random_seed($seed): ?bool {}
/** @return GMP|false */
function gmp_random_bits(int $bits) {}
@@ -260,39 +237,27 @@ function gmp_com($a) {}
*/
function gmp_xor($a, $b) {}
-/** @return null|false */
-function gmp_setbit(GMP $a, int $index, bool $set_clear = true) {}
+function gmp_setbit(GMP $a, int $index, bool $set_clear = true): ?bool {}
-/** @return null|false */
-function gmp_clrbit(GMP $a, int $index) {}
+function gmp_clrbit(GMP $a, int $index): ?bool {}
/** @param GMP|int|bool|string $a */
function gmp_testbit($a, int $index): bool {}
-/**
- * @param GMP|int|bool|string $a
- * @return int|false
- */
-function gmp_scan0($a, int $start) {}
+/** @param GMP|int|bool|string $a */
+function gmp_scan0($a, int $start): int|false {}
-/**
- * @param GMP|int|bool|string $a
- * @return int|false
- */
-function gmp_scan1($a, int $start) {}
+/** @param GMP|int|bool|string $a */
+function gmp_scan1($a, int $start): int|false {}
-/**
- * @param GMP|int|bool|string $a
- * @return int|false
- */
-function gmp_popcount($a) {}
+/** @param GMP|int|bool|string $a */
+function gmp_popcount($a): int|false {}
/**
* @param GMP|int|bool|string $a
* @param GMP|int|bool|string $b
- * @return int|false
*/
-function gmp_hamdist($a, $b) {}
+function gmp_hamdist($a, $b): int|false {}
/**
* @param GMP|int|bool|string $a
diff --git a/ext/gmp/gmp_arginfo.h b/ext/gmp/gmp_arginfo.h
index c380b9a526..c1729432ba 100644
--- a/ext/gmp/gmp_arginfo.h
+++ b/ext/gmp/gmp_arginfo.h
@@ -11,7 +11,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_import, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_export, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_export, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, gmpnumber)
ZEND_ARG_TYPE_INFO(0, word_size, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
@@ -35,17 +35,21 @@ ZEND_END_ARG_INFO()
#define arginfo_gmp_mul arginfo_gmp_add
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_div_qr, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_div_qr, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, a)
ZEND_ARG_INFO(0, b)
ZEND_ARG_TYPE_INFO(0, round, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_gmp_div_q arginfo_gmp_div_qr
+ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_div_q, 0, 0, 2)
+ ZEND_ARG_INFO(0, a)
+ ZEND_ARG_INFO(0, b)
+ ZEND_ARG_TYPE_INFO(0, round, IS_LONG, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_gmp_div_r arginfo_gmp_div_qr
+#define arginfo_gmp_div_r arginfo_gmp_div_q
-#define arginfo_gmp_div arginfo_gmp_div_qr
+#define arginfo_gmp_div arginfo_gmp_div_q
#define arginfo_gmp_mod arginfo_gmp_add
@@ -61,14 +65,19 @@ ZEND_END_ARG_INFO()
#define arginfo_gmp_sqrt arginfo_gmp_neg
-#define arginfo_gmp_sqrtrem arginfo_gmp_neg
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_sqrtrem, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, a)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_root, 0, 0, 2)
ZEND_ARG_INFO(0, a)
ZEND_ARG_TYPE_INFO(0, nth, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_gmp_rootrem arginfo_gmp_root
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_rootrem, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, a)
+ ZEND_ARG_TYPE_INFO(0, nth, IS_LONG, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_pow, 0, 0, 2)
ZEND_ARG_INFO(0, base)
@@ -87,7 +96,7 @@ ZEND_END_ARG_INFO()
#define arginfo_gmp_perfect_power arginfo_gmp_perfect_square
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_prob_prime, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_prob_prime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, a)
ZEND_ARG_TYPE_INFO(0, reps, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -100,17 +109,22 @@ ZEND_END_ARG_INFO()
#define arginfo_gmp_invert arginfo_gmp_add
-#define arginfo_gmp_jacobi arginfo_gmp_add
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_jacobi, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, a)
+ ZEND_ARG_INFO(0, b)
+ZEND_END_ARG_INFO()
-#define arginfo_gmp_legendre arginfo_gmp_add
+#define arginfo_gmp_legendre arginfo_gmp_jacobi
-#define arginfo_gmp_kronecker arginfo_gmp_add
+#define arginfo_gmp_kronecker arginfo_gmp_jacobi
-#define arginfo_gmp_cmp arginfo_gmp_add
+#define arginfo_gmp_cmp arginfo_gmp_jacobi
-#define arginfo_gmp_sign arginfo_gmp_neg
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_sign, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, a)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_random_seed, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_random_seed, 0, 1, _IS_BOOL, 1)
ZEND_ARG_INFO(0, seed)
ZEND_END_ARG_INFO()
@@ -131,13 +145,13 @@ ZEND_END_ARG_INFO()
#define arginfo_gmp_xor arginfo_gmp_add
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_setbit, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_setbit, 0, 2, _IS_BOOL, 1)
ZEND_ARG_OBJ_INFO(0, a, GMP, 0)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, set_clear, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_clrbit, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_clrbit, 0, 2, _IS_BOOL, 1)
ZEND_ARG_OBJ_INFO(0, a, GMP, 0)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -147,16 +161,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gmp_testbit, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_scan0, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gmp_scan0, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, a)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
ZEND_END_ARG_INFO()
#define arginfo_gmp_scan1 arginfo_gmp_scan0
-#define arginfo_gmp_popcount arginfo_gmp_neg
+#define arginfo_gmp_popcount arginfo_gmp_sign
-#define arginfo_gmp_hamdist arginfo_gmp_add
+#define arginfo_gmp_hamdist arginfo_gmp_jacobi
#define arginfo_gmp_nextprime arginfo_gmp_neg
diff --git a/ext/hash/hash.stub.php b/ext/hash/hash.stub.php
index 5f28ad9799..d874a0ab18 100644
--- a/ext/hash/hash.stub.php
+++ b/ext/hash/hash.stub.php
@@ -1,20 +1,15 @@
<?php
-/** @return string|false */
-function hash(string $algo, string $data, bool $raw_output = false) {}
+function hash(string $algo, string $data, bool $raw_output = false): string|false {}
-/** @return string|false */
-function hash_file(string $algo, string $filename, bool $raw_output = false) {}
+function hash_file(string $algo, string $filename, bool $raw_output = false): string|false {}
-/** @return string|false */
-function hash_hmac(string $algo, string $data, string $key, bool $raw_output = false) {}
+function hash_hmac(string $algo, string $data, string $key, bool $raw_output = false): string|false {}
-/** @return string|false */
-function hash_hmac_file(string $algo, string $data, string $key, bool $raw_output = false) {}
+function hash_hmac_file(string $algo, string $data, string $key, bool $raw_output = false): string|false {}
function hash_init(string $algo, int $options = 0, string $key = UNKNOWN): HashContext {}
-/** @return true */
function hash_update(HashContext $context, string $data): bool {}
/** @param resource $handle */
@@ -40,19 +35,15 @@ function hash_equals(string $known_string, string $user_string) : bool {}
function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string {}
#ifdef PHP_MHASH_BC
-/** @return int|false */
-function mhash_get_block_size(int $hash) {}
+function mhash_get_block_size(int $hash): int|false {}
-/** @return string|false */
-function mhash_get_hash_name(int $hash) {}
+function mhash_get_hash_name(int $hash): string|false {}
-/** @return string|false */
-function mhash_keygen_s2k(int $hash, string $input_password, string $salt, int $bytes) {}
+function mhash_keygen_s2k(int $hash, string $input_password, string $salt, int $bytes): string|false {}
function mhash_count(): int {}
-/** @return string|false */
-function mhash(int $hash, string $data, string $key = UNKNOWN) {}
+function mhash(int $hash, string $data, string $key = UNKNOWN): string|false {}
#endif
class HashContext {
diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h
index 6ba7a403cb..41d22f4a8e 100644
--- a/ext/hash/hash_arginfo.h
+++ b/ext/hash/hash_arginfo.h
@@ -1,18 +1,18 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_hash, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_file, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_hmac, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_hmac, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
@@ -79,17 +79,19 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_hkdf, 0, 2, IS_STRING, 0)
ZEND_END_ARG_INFO()
#if defined(PHP_MHASH_BC)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mhash_get_block_size, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_block_size, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(PHP_MHASH_BC)
-#define arginfo_mhash_get_hash_name arginfo_mhash_get_block_size
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_hash_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0)
+ZEND_END_ARG_INFO()
#endif
#if defined(PHP_MHASH_BC)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mhash_keygen_s2k, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_keygen_s2k, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, input_password, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
@@ -103,7 +105,7 @@ ZEND_END_ARG_INFO()
#endif
#if defined(PHP_MHASH_BC)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mhash, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hash, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
diff --git a/ext/iconv/iconv.stub.php b/ext/iconv/iconv.stub.php
index 965c4a7e96..9fbbcd67a0 100644
--- a/ext/iconv/iconv.stub.php
+++ b/ext/iconv/iconv.stub.php
@@ -1,30 +1,21 @@
<?php
-/** @return string|false */
-function iconv_strlen(string $str, string $charset = UNKNOWN) {}
+function iconv_strlen(string $str, string $charset = UNKNOWN): string|int|false {}
-/** @return string|false */
-function iconv_substr(string $str, int $offset, ?int $length = null, string $charset = UNKNOWN) {}
+function iconv_substr(string $str, int $offset, ?int $length = null, string $charset = UNKNOWN): string|false {}
-/** @return int|false */
-function iconv_strpos(string $haystack, string $needle, int $offset = 0, string $charset = UNKNOWN) {}
+function iconv_strpos(string $haystack, string $needle, int $offset = 0, string $charset = UNKNOWN): int|false {}
-/** @return int|false */
-function iconv_strrpos(string $haystack, string $needle, string $charset = UNKNOWN) {}
+function iconv_strrpos(string $haystack, string $needle, string $charset = UNKNOWN): int|false {}
-/** @return string|false */
-function iconv_mime_encode(string $field_name, string $field_value, array $preference = []) {}
+function iconv_mime_encode(string $field_name, string $field_value, array $preference = []): string|false {}
-/** @return string|false */
-function iconv_mime_decode(string $encoded_string, int $mode = 0, string $charset = UNKNOWN) {}
+function iconv_mime_decode(string $encoded_string, int $mode = 0, string $charset = UNKNOWN): string|false {}
-/** @return array|false */
-function iconv_mime_decode_headers(string $headers, int $mode = 0, string $charset = UNKNOWN) {}
+function iconv_mime_decode_headers(string $headers, int $mode = 0, string $charset = UNKNOWN): array|false {}
-/** @return string|false */
-function iconv(string $in_charset, string $out_charset, string $str) {}
+function iconv(string $in_charset, string $out_charset, string $str): string|false {}
function iconv_set_encoding(string $type, string $charset): bool {}
-/** @return array|string|false */
-function iconv_get_encoding(string $type = 'all') {}
+function iconv_get_encoding(string $type = 'all'): array|string|false {}
diff --git a/ext/iconv/iconv_arginfo.h b/ext/iconv/iconv_arginfo.h
index 462b1cfbe4..fcd6a5c348 100644
--- a/ext/iconv/iconv_arginfo.h
+++ b/ext/iconv/iconv_arginfo.h
@@ -1,49 +1,49 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_strlen, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_substr, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_strpos, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_strrpos, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strrpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_mime_encode, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_encode, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, field_value, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, preference, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_mime_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_mime_decode_headers, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, in_charset, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, out_charset, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
@@ -54,6 +54,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iconv_set_encoding, 0, 2, _IS_BO
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iconv_get_encoding, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_get_encoding, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/imap/php_imap.stub.php b/ext/imap/php_imap.stub.php
index ab3a24b54d..241edd6b47 100644
--- a/ext/imap/php_imap.stub.php
+++ b/ext/imap/php_imap.stub.php
@@ -15,23 +15,14 @@ function imap_reopen($stream_id, string $mailbox, int $options = 0, int $n_retri
*/
function imap_close($stream_id, int $options = 0): bool {}
-/**
- * @param resource $stream_id
- * @return int|false
- */
-function imap_num_msg($stream_id) {}
+/** @param resource $stream_id */
+function imap_num_msg($stream_id): int|false {}
-/**
- * @param resource $stream_id
- * @return int|false
- */
-function imap_num_recent($stream_id) {}
+/** @param resource $stream_id */
+function imap_num_recent($stream_id): int|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_headers($stream_id) {}
+/** @param resource $stream_id */
+function imap_headers($stream_id): array|false {}
/**
* @param resource $stream_id
@@ -41,20 +32,12 @@ function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $sub
function imap_rfc822_parse_headers(string $headers, string $default_host = 'UNKNOWN'): \stdClass {}
-/**
- * @return string|false
- */
-function imap_rfc822_write_address(string $mailbox, string $host, string $personal) {}
+function imap_rfc822_write_address(string $mailbox, string $host, string $personal): string|false {}
function imap_rfc822_parse_adrlist(string $address_string, string $default_host): array {}
-
-/**
- * @param resource $stream_id
- * @return string|false
- */
-function imap_body($stream_id, int $msg_no, int $options = 0) {}
-
+/** @param resource $stream_id */
+function imap_body($stream_id, int $msg_no, int $options = 0): string|false {}
/**
* @param resource $stream_id
@@ -62,18 +45,11 @@ function imap_body($stream_id, int $msg_no, int $options = 0) {}
*/
function imap_bodystruct($stream_id, int $msg_no, string $section) {}
-/**
- * @param resource $stream_id
- * @return string|false
- */
-function imap_fetchbody($stream_id, int $msg_no, string $section, int $options = 0) {}
-
-/**
- * @param resource $stream_id
- * @return string|false
- */
-function imap_fetchmime($stream_id, int $msg_no, string $section, int $options = 0) {}
+/** @param resource $stream_id */
+function imap_fetchbody($stream_id, int $msg_no, string $section, int $options = 0): string|false {}
+/** @param resource $stream_id */
+function imap_fetchmime($stream_id, int $msg_no, string $section, int $options = 0): string|false {}
/**
* @param resource $stream_id
@@ -81,11 +57,8 @@ function imap_fetchmime($stream_id, int $msg_no, string $section, int $options =
*/
function imap_savebody($stream_id, $file, int $msg_no, string $section = '', int $options = 0): bool {}
-/**
- * @param resource $stream_id
- * @return string|false
- */
-function imap_fetchheader($stream_id, int $msg_no, int $options = 0) {}
+/** @param resource $stream_id */
+function imap_fetchheader($stream_id, int $msg_no, int $options = 0): string|false {}
/**
* @param resource $stream_id
@@ -119,11 +92,8 @@ function imap_undelete($stream_id, string $msg_no, int $options = 0): bool {}
*/
function imap_check($stream_id) {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_listscan($stream_id, string $ref, string $pattern, string $content) {}
+/** @param resource $stream_id */
+function imap_listscan($stream_id, string $ref, string $pattern, string $content): array|false {}
/**
* @param resource $stream_id
@@ -135,10 +105,7 @@ function imap_mail_copy($stream_id, string $msglist, string $mailbox, int $optio
*/
function imap_mail_move($stream_id, string $sequence, string $mailbox, int $options = 0): bool {}
-/**
- * @return string|false
- */
-function imap_mail_compose(array $envelope, array $body) {}
+function imap_mail_compose(array $envelope, array $body): string|false {}
/**
* @param resource $stream_id
@@ -175,25 +142,13 @@ function imap_append($stream_id, string $folder, string $message, string $option
*/
function imap_ping($stream_id): bool {}
-/**
- * @return string|false
- */
-function imap_base64(string $text) {}
+function imap_base64(string $text): string|false {}
-/**
- * @return string|false
- */
-function imap_qprint(string $text) {}
+function imap_qprint(string $text): string|false {}
-/**
- * @return string|false
- */
-function imap_8bit(string $text) {}
+function imap_8bit(string $text): string|false {}
-/**
- * @return string|false
- */
-function imap_binary(string $text) {}
+function imap_binary(string $text): string|false {}
function imap_utf8(string $mime_encoded_text): string {}
@@ -219,125 +174,63 @@ function imap_setflag_full($stream_id, string $sequence, string $flag, int $opti
*/
function imap_clearflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, string $search_criteria = UNKNOWN, string $charset = UNKNOWN) {}
-
+/** @param resource $stream_id */
+function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, string $search_criteria = UNKNOWN, string $charset = UNKNOWN): array|false {}
-/**
- * @param resource $stream_id
- * @return int|false
- */
-function imap_uid($stream_id, int $msg_no) {}
-/**
- * @param resource $stream_id
- * @return int|false
- */
-function imap_msgno($stream_id, int $unique_msg_id) {}
+/** @param resource $stream_id */
+function imap_uid($stream_id, int $msg_no): int|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_list($stream_id, string $ref, string $pattern) {}
+/** @param resource $stream_id */
+function imap_msgno($stream_id, int $unique_msg_id): int|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_lsub($stream_id, string $ref, string $pattern) {}
+/** @param resource $stream_id */
+function imap_list($stream_id, string $ref, string $pattern): array|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_getsubscribed($stream_id, string $ref, string $pattern) {}
+/** @param resource $stream_id */
+function imap_lsub($stream_id, string $ref, string $pattern): array|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_getmailboxes($stream_id, string $ref, string $pattern) {}
+/** @param resource $stream_id */
+function imap_getsubscribed($stream_id, string $ref, string $pattern): array|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_fetch_overview($stream_id, string $sequence, int $options = 0) {}
+/** @param resource $stream_id */
+function imap_getmailboxes($stream_id, string $ref, string $pattern): array|false {}
-/**
- * @return array|false
- */
-function imap_alerts() {}
+/** @param resource $stream_id */
+function imap_fetch_overview($stream_id, string $sequence, int $options = 0): array|false {}
-/**
- * @return array|false
- */
-function imap_errors() {}
+function imap_alerts(): array|false {}
-/**
- * @return string|false
- */
-function imap_last_error() {}
+function imap_errors(): array|false {}
+function imap_last_error(): string|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_search($stream_id, string $criteria, int $options = \SE_FREE, string $charset = '') {}
+/** @param resource $stream_id */
+function imap_search($stream_id, string $criteria, int $options = \SE_FREE, string $charset = ''): array|false {}
-/**
- * @return string|false
- */
-function imap_utf7_decode(string $buf) {}
+function imap_utf7_decode(string $buf): string|false {}
function imap_utf7_encode(string $buf): string {}
#ifdef HAVE_IMAP_MUTF7
-/**
- * @return string|false
- */
-function imap_utf8_to_mutf7(string $in) {}
+function imap_utf8_to_mutf7(string $in): string|false {}
-/**
- * @return string|false
- */
-function imap_mutf7_to_utf8(string $in) {}
+function imap_mutf7_to_utf8(string $in): string|false {}
#endif
-/**
- * @return array|false
- */
-function imap_mime_header_decode(string $str) {}
-
+function imap_mime_header_decode(string $str): array|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_thread($stream_id, int $options = \SE_FREE) {}
+/** @param resource $stream_id */
+function imap_thread($stream_id, int $options = \SE_FREE): array|false {}
-/**
- * @return int|bool
- */
-function imap_timeout(int $timeout_type, int $timeout = -1) {}
+function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_get_quota($stream_id, string $qroot) {}
+/** @param resource $stream_id */
+function imap_get_quota($stream_id, string $qroot): array|false {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_get_quotaroot($stream_id, string $mbox) {}
+/** @param resource $stream_id */
+function imap_get_quotaroot($stream_id, string $mbox): array|false {}
/**
* @param resource $stream_id
@@ -349,11 +242,8 @@ function imap_set_quota($stream_id, string $qroot, int $mailbox_size): bool {}
*/
function imap_setacl($stream_id, string $mailbox, string $id, string $rights): bool {}
-/**
- * @param resource $stream_id
- * @return array|false
- */
-function imap_getacl($stream_id, string $mailbox) {}
+/** @param resource $stream_id */
+function imap_getacl($stream_id, string $mailbox): array|false {}
#endif
function imap_mail(string $to, string $subject, string $message, string $additional_headers = UNKNOWN, string $cc = UNKNOWN, string $bcc = UNKNOWN, string $rpath = UNKNOWN): bool {}
diff --git a/ext/imap/php_imap_arginfo.h b/ext/imap/php_imap_arginfo.h
index b39e445758..cef03f3cf6 100644
--- a/ext/imap/php_imap_arginfo.h
+++ b/ext/imap/php_imap_arginfo.h
@@ -21,13 +21,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_close, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_num_msg, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_END_ARG_INFO()
#define arginfo_imap_num_recent arginfo_imap_num_msg
-#define arginfo_imap_headers arginfo_imap_num_msg
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, stream_id)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_headerinfo, 0, 0, 2)
ZEND_ARG_INFO(0, stream_id)
@@ -42,7 +44,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1,
ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_rfc822_write_address, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_rfc822_write_address, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
@@ -53,7 +55,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_rfc822_parse_adrlist, 0, 2,
ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_body, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
@@ -65,7 +67,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_bodystruct, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_fetchbody, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetchbody, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
@@ -84,7 +86,11 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_fetchheader arginfo_imap_body
-#define arginfo_imap_fetchstructure arginfo_imap_body
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_fetchstructure, 0, 0, 2)
+ ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_gc, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(0, stream_id)
@@ -103,9 +109,11 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_undelete arginfo_imap_delete
-#define arginfo_imap_check arginfo_imap_num_msg
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_check, 0, 0, 1)
+ ZEND_ARG_INFO(0, stream_id)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_listscan, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_listscan, 0, 4, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, ref, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
@@ -126,7 +134,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_move, 0, 3, _IS_BOOL,
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_mail_compose, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mail_compose, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, envelope, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, body, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
@@ -158,7 +166,7 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_ping arginfo_imap_expunge
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_base64, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_base64, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -191,7 +199,7 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_clearflag_full arginfo_imap_setflag_full
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_sort, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_sort, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, criteria, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, reverse, IS_LONG, 0)
@@ -200,17 +208,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_sort, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_uid, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_msgno, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_msgno, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, unique_msg_id, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_list, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_list, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, ref, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
@@ -222,27 +230,28 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_getmailboxes arginfo_imap_list
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_fetch_overview, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetch_overview, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_alerts, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_alerts, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#define arginfo_imap_errors arginfo_imap_alerts
-#define arginfo_imap_last_error arginfo_imap_alerts
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_last_error, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_search, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_search, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, criteria, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_utf7_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf7_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -251,7 +260,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf7_encode, 0, 1, IS_STRIN
ZEND_END_ARG_INFO()
#if defined(HAVE_IMAP_MUTF7)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_utf8_to_mutf7, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf8_to_mutf7, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, in, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
@@ -260,29 +269,29 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_mutf7_to_utf8 arginfo_imap_utf8_to_mutf7
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_mime_header_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mime_header_decode, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_thread, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_thread, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_timeout, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_timeout, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, timeout_type, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_get_quota, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quota, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, qroot, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_get_quotaroot, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quotaroot, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, mbox, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -306,7 +315,7 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_getacl, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_getacl, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php
index 36b1c91a19..2a9a2be39c 100644
--- a/ext/intl/timezone/timezone.stub.php
+++ b/ext/intl/timezone/timezone.stub.php
@@ -81,8 +81,7 @@ class IntlTimeZone
public function useDaylightTime() {}
}
-/** @return int|false */
-function intltz_count_equivalent_ids(string $zoneId) {}
+function intltz_count_equivalent_ids(string $zoneId): int|false {}
function intltz_create_default(): IntlTimeZone {}
@@ -99,48 +98,36 @@ function intltz_create_time_zone_id_enumeration(int $zoneType, ?string $region =
function intltz_from_date_time_zone(DateTimeZone $zone): ?IntlTimeZone {}
-/** @return string|false */
-function intltz_get_canonical_id(string $zoneId, &$isSystemID = null) {}
+function intltz_get_canonical_id(string $zoneId, &$isSystemID = null): string|false {}
-/** @return string|false */
-function intltz_get_display_name(IntlTimeZone $tz, bool $isDaylight = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null) {}
+function intltz_get_display_name(IntlTimeZone $tz, bool $isDaylight = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {}
-/** @return int|false */
-function intltz_get_dst_savings(IntlTimeZone $tz) {}
+function intltz_get_dst_savings(IntlTimeZone $tz): int|false {}
-/** @return string|false */
-function intltz_get_equivalent_id(string $zoneId, int $index) {}
+function intltz_get_equivalent_id(string $zoneId, int $index): string|false {}
-/** @return int|false */
-function intltz_get_error_code(IntlTimeZone $tz) {}
+function intltz_get_error_code(IntlTimeZone $tz): int|false {}
-/** @return string|false */
-function intltz_get_error_message(IntlTimeZone $tz) {}
+function intltz_get_error_message(IntlTimeZone $tz): string|false {}
function intltz_get_gmt(): IntlTimeZone {}
-/** @return string|false */
-function intltz_get_id(IntlTimeZone $tz) {}
+function intltz_get_id(IntlTimeZone $tz): string|false {}
function intltz_get_offset(IntlTimeZone $tz, float $date, bool $local, &$rawOffset, &$dstOffset): bool {}
-/** @return int|false */
-function intltz_get_raw_offset(IntlTimeZone $tz) {}
+function intltz_get_raw_offset(IntlTimeZone $tz): int|false {}
-/** @return string|false */
-function intltz_get_region(string $zoneId) {}
+function intltz_get_region(string $zoneId): string|false {}
-/** @return string|false */
-function intltz_get_tz_data_version() {}
+function intltz_get_tz_data_version(): string|false {}
function intltz_get_unknown(): IntlTimeZone {}
#if U_ICU_VERSION_MAJOR_NUM >= 52
-/** @return string|false */
-function intltz_get_windows_id(string $timezone) {}
+function intltz_get_windows_id(string $timezone): string|false {}
-/** @return string|false */
-function intltz_get_id_for_windows_id(string $timezone, string $region = UNKNOWN) {}
+function intltz_get_id_for_windows_id(string $timezone, string $region = UNKNOWN): string|false {}
#endif
function intltz_has_same_rules(IntlTimeZone $tz, IntlTimeZone $otherTimeZone): bool {}
diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h
index 48d99f5ee9..72a3c964c6 100644
--- a/ext/intl/timezone/timezone_arginfo.h
+++ b/ext/intl/timezone/timezone_arginfo.h
@@ -87,7 +87,9 @@ ZEND_END_ARG_INFO()
#define arginfo_class_IntlTimeZone_useDaylightTime arginfo_class_IntlTimeZone___construct
-#define arginfo_intltz_count_equivalent_ids arginfo_class_IntlTimeZone_countEquivalentIDs
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_count_equivalent_ids, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_default, 0, 0, IntlTimeZone, 0)
ZEND_END_ARG_INFO()
@@ -104,28 +106,36 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_from_date_time_zone, 0, 1,
ZEND_ARG_OBJ_INFO(0, zone, DateTimeZone, 0)
ZEND_END_ARG_INFO()
-#define arginfo_intltz_get_canonical_id arginfo_class_IntlTimeZone_getCanonicalID
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_canonical_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0)
+ ZEND_ARG_INFO(1, isSystemID)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intltz_get_display_name, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_display_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0)
ZEND_ARG_TYPE_INFO(0, isDaylight, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intltz_get_dst_savings, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_dst_savings, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0)
ZEND_END_ARG_INFO()
-#define arginfo_intltz_get_equivalent_id arginfo_class_IntlTimeZone_getEquivalentID
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_equivalent_id, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
+ZEND_END_ARG_INFO()
#define arginfo_intltz_get_error_code arginfo_intltz_get_dst_savings
-#define arginfo_intltz_get_error_message arginfo_intltz_get_dst_savings
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0)
+ZEND_END_ARG_INFO()
#define arginfo_intltz_get_gmt arginfo_intltz_create_default
-#define arginfo_intltz_get_id arginfo_intltz_get_dst_savings
+#define arginfo_intltz_get_id arginfo_intltz_get_error_message
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_get_offset, 0, 5, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0)
@@ -137,18 +147,26 @@ ZEND_END_ARG_INFO()
#define arginfo_intltz_get_raw_offset arginfo_intltz_get_dst_savings
-#define arginfo_intltz_get_region arginfo_class_IntlTimeZone_countEquivalentIDs
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_region, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_intltz_get_tz_data_version arginfo_class_IntlTimeZone___construct
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_tz_data_version, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
#define arginfo_intltz_get_unknown arginfo_intltz_create_default
#if U_ICU_VERSION_MAJOR_NUM >= 52
-#define arginfo_intltz_get_windows_id arginfo_class_IntlTimeZone_getWindowsID
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_windows_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0)
+ZEND_END_ARG_INFO()
#endif
#if U_ICU_VERSION_MAJOR_NUM >= 52
-#define arginfo_intltz_get_id_for_windows_id arginfo_class_IntlTimeZone_getIDForWindowsID
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intltz_get_id_for_windows_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, timezone, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 0)
+ZEND_END_ARG_INFO()
#endif
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_has_same_rules, 0, 2, _IS_BOOL, 0)
@@ -156,7 +174,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_has_same_rules, 0, 2, _IS
ZEND_ARG_OBJ_INFO(0, otherTimeZone, IntlTimeZone, 0)
ZEND_END_ARG_INFO()
-#define arginfo_intltz_to_date_time_zone arginfo_intltz_get_dst_savings
+ZEND_BEGIN_ARG_INFO_EX(arginfo_intltz_to_date_time_zone, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_use_daylight_time, 0, 1, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0)
diff --git a/ext/json/json.stub.php b/ext/json/json.stub.php
index 6b00648461..90bedef91e 100644
--- a/ext/json/json.stub.php
+++ b/ext/json/json.stub.php
@@ -1,7 +1,6 @@
<?php
-/** @return string|false */
-function json_encode($value, int $options = 0, int $depth = 512) {}
+function json_encode($value, int $options = 0, int $depth = 512): string|false {}
/** @return mixed */
function json_decode(string $json, ?bool $assoc = null, int $depth = 512, int $options = 0) {}
diff --git a/ext/json/json_arginfo.h b/ext/json/json_arginfo.h
index b717716790..2a06f84f6c 100644
--- a/ext/json/json_arginfo.h
+++ b/ext/json/json_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_json_encode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, value)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, depth, IS_LONG, 0)
diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php
index 236b69e825..e8a2fc8a32 100644
--- a/ext/ldap/ldap.stub.php
+++ b/ext/ldap/ldap.stub.php
@@ -91,23 +91,20 @@ function ldap_next_entry($link_identifier, $result_identifier) {}
/**
* @param resource $link_identifier
* @param resource $result_identifier
- * @return array|false
*/
-function ldap_get_entries($link_identifier, $result_identifier) {}
+function ldap_get_entries($link_identifier, $result_identifier): array|false {}
/**
* @param resource $link_identifier
* @param resource $result_entry_identifier
- * @return string|false
*/
-function ldap_first_attribute($link_identifier, $result_entry_identifier, int $dummy_ber = UNKNOWN) {}
+function ldap_first_attribute($link_identifier, $result_entry_identifier, int $dummy_ber = UNKNOWN): string|false {}
/**
* @param resource $link_identifier
* @param resource $result_entry_identifier
- * @return string|false
*/
-function ldap_next_attribute($link_identifier, $result_entry_identifier, int $dummy_ber = UNKNOWN) {}
+function ldap_next_attribute($link_identifier, $result_entry_identifier, int $dummy_ber = UNKNOWN): string|false {}
/**
* @param resource $link_identifier
@@ -118,37 +115,26 @@ function ldap_get_attributes($link_identifier, $result_entry_identifier): array
/**
* @param resource $link_identifier
* @param resource $result_entry_identifier
- * @return array|false
*/
-function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute) {}
+function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array|false {}
/**
* @param resource $link_identifier
* @param resource $result_entry_identifier
- * @return array|false
*/
-function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute) {}
+function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array|false {}
/**
* @param resource $link_identifier
* @param resource $result_entry_identifier
- * @return string|false
*/
-function ldap_get_dn($link_identifier, $result_entry_identifier) {}
+function ldap_get_dn($link_identifier, $result_entry_identifier): string|false {}
-/**
- * @return array|false
- */
-function ldap_explode_dn(string $dn, int $with_attrib) {}
+function ldap_explode_dn(string $dn, int $with_attrib): array|false {}
-/**
- * @return string|false
- */
-function ldap_dn2ufn(string $dn) {}
+function ldap_dn2ufn(string $dn): string|false {}
-/**
- * @param resource $link_identifier
- */
+/** @param resource $link_identifier */
function ldap_add($link_identifier, string $dn, array $entry, array $servercontrols = []): bool {}
/**
@@ -157,9 +143,7 @@ function ldap_add($link_identifier, string $dn, array $entry, array $servercontr
*/
function ldap_add_ext($link_identifier, string $dn, array $entry, array $servercontrols = []) {}
-/**
- * @param resource $link_identifier
- */
+/** @param resource $link_identifier */
function ldap_delete($link_identifier, string $dn, array $servercontrols = []): bool {}
/**
@@ -224,11 +208,8 @@ function ldap_error($link): string {}
function ldap_err2str(int $errno): string {}
-/**
- * @param resource $link_identifier
- * @return bool|int
- */
-function ldap_compare($link_identifier, string $dn, string $attribute, string $value, array $servercontrols = []) {}
+/** @param resource $link_identifier */
+function ldap_compare($link_identifier, string $dn, string $attribute, string $value, array $servercontrols = []): bool|int {}
#ifdef LDAP_CONTROL_PAGEDRESULTS
@@ -313,15 +294,9 @@ function ldap_start_tls($link_identifier): bool {}
function ldap_escape(string $value, string $ignore = '', int $flags = 0): string {}
#ifdef STR_TRANSLATION
-/**
- * @return string|false
- */
-function ldap_t61_to_8859(string $value) {}
+function ldap_t61_to_8859(string $value): string|false {}
-/**
- * @return string|false
- */
-function ldap_8859_to_t61(string $value) {}
+function ldap_8859_to_t61(string $value): string|false {}
#endif
@@ -334,29 +309,20 @@ function ldap_exop($link, string $reqoid, ?string $reqdata = null, ?array $serve
#endif
#ifdef HAVE_LDAP_PASSWD
-/**
- * @param resource $link
- * @return string|bool
- */
-function ldap_exop_passwd($link, string $user = '', string $oldpw = '', string $newpw = '', &$serverctrls = null) {}
+/** @param resource $link */
+function ldap_exop_passwd($link, string $user = '', string $oldpw = '', string $newpw = '', &$serverctrls = null): string|bool {}
#endif
#ifdef HAVE_LDAP_WHOAMI_S
-/**
- * @param resource $link
- * @return string|bool
- */
-function ldap_exop_whoami($link) {}
+/** @param resource $link */
+function ldap_exop_whoami($link): string|bool {}
#endif
#ifdef HAVE_LDAP_REFRESH_S
-/**
- * @param resource $link
- * @return int|false
- */
-function ldap_exop_refresh($link, string $dn, $ttl) {}
+/** @param resource $link */
+function ldap_exop_refresh($link, string $dn, $ttl): int|false {}
#endif
@@ -367,4 +333,3 @@ function ldap_exop_refresh($link, string $dn, $ttl) {}
*/
function ldap_parse_exop($link, $result, &$retdata = null, &$retoid = null): bool {}
#endif
-
diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h
index b5060e3c10..c7e5429bdf 100644
--- a/ext/ldap/ldap_arginfo.h
+++ b/ext/ldap/ldap_arginfo.h
@@ -79,9 +79,12 @@ ZEND_END_ARG_INFO()
#define arginfo_ldap_next_entry arginfo_ldap_first_entry
-#define arginfo_ldap_get_entries arginfo_ldap_first_entry
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_entries, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, link_identifier)
+ ZEND_ARG_INFO(0, result_identifier)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_first_attribute, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_first_attribute, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, link_identifier)
ZEND_ARG_INFO(0, result_entry_identifier)
ZEND_ARG_TYPE_INFO(0, dummy_ber, IS_LONG, 0)
@@ -94,7 +97,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_attributes, 0, 2, IS_AR
ZEND_ARG_INFO(0, result_entry_identifier)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_get_values, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_values, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, link_identifier)
ZEND_ARG_INFO(0, result_entry_identifier)
ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0)
@@ -102,17 +105,17 @@ ZEND_END_ARG_INFO()
#define arginfo_ldap_get_values_len arginfo_ldap_get_values
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_get_dn, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_dn, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, link_identifier)
ZEND_ARG_INFO(0, result_entry_identifier)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_explode_dn, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_explode_dn, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, with_attrib, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_dn2ufn, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_dn2ufn, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -175,7 +178,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_err2str, 0, 1, IS_STRING, 0
ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_compare, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_compare, 0, 4, MAY_BE_BOOL|MAY_BE_LONG)
ZEND_ARG_INFO(0, link_identifier)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0)
@@ -293,7 +296,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_escape, 0, 1, IS_STRING, 0)
ZEND_END_ARG_INFO()
#if defined(STR_TRANSLATION)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_t61_to_8859, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_t61_to_8859, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
@@ -314,7 +317,7 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_LDAP_PASSWD)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop_passwd, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_passwd, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_INFO(0, link)
ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, oldpw, IS_STRING, 0)
@@ -324,13 +327,13 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_LDAP_WHOAMI_S)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop_whoami, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_whoami, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_INFO(0, link)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_LDAP_REFRESH_S)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop_refresh, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_refresh, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, link)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_INFO(0, ttl)
diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php
index ed017a3fa2..afe9f50e88 100644
--- a/ext/mbstring/mbstring.stub.php
+++ b/ext/mbstring/mbstring.stub.php
@@ -1,175 +1,120 @@
<?php
-/** @return string|false */
-function mb_language(string $language = UNKNOWN) {}
+function mb_language(string $language = UNKNOWN): string|bool {}
-/** @return string|false */
-function mb_internal_encoding(string $encoding = UNKNOWN) {}
+function mb_internal_encoding(string $encoding = UNKNOWN): string|bool {}
-/** @return array|string|false */
-function mb_http_input(string $type = UNKNOWN) {}
+function mb_http_input(string $type = UNKNOWN): array|string|false {}
-/** @return string|false */
-function mb_http_output(string $encoding = UNKNOWN) {}
+function mb_http_output(string $encoding = UNKNOWN): string|bool {}
-/** @return array|bool */
-function mb_detect_order($encoding = UNKNOWN) {}
+function mb_detect_order($encoding = UNKNOWN): array|bool {}
-/** @return string|int|bool */
-function mb_substitute_character($substchar = UNKNOWN) {}
+function mb_substitute_character($substchar = UNKNOWN): string|int|bool {}
-/** @return string|false */
-function mb_preferred_mime_name(string $encoding) {}
+function mb_preferred_mime_name(string $encoding): string|false {}
function mb_parse_str(string $encoded_string, &$result): bool {}
function mb_output_handler(string $contents, int $status): string {}
-/** @return array|false */
-function mb_str_split(string $str, int $split_length = 1, string $encoding = UNKNOWN) {}
+function mb_str_split(string $str, int $split_length = 1, string $encoding = UNKNOWN): array|false {}
-/** @return int|false */
-function mb_strlen(string $str, string $encoding = UNKNOWN) {}
+function mb_strlen(string $str, string $encoding = UNKNOWN): int|false {}
-/** @return int|false */
-function mb_strpos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN) {}
+function mb_strpos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {}
-/** @return int|false */
-function mb_strrpos(string $haystack, string $needle, $offset = UNBEK, string $encoding = UNKNOWN) {}
+function mb_strrpos(string $haystack, string $needle, $offset = UNBEK, string $encoding = UNKNOWN): int|false {}
-/** @return int|false */
-function mb_stripos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN) {}
+function mb_stripos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {}
-/** @return int|false */
-function mb_strripos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN) {}
+function mb_strripos(string $haystack, string $needle, int $offset = 0, string $encoding = UNKNOWN): int|false {}
-/** @return string|false */
-function mb_strstr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN) {}
+function mb_strstr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN): string|false {}
-/** @return string|false */
-function mb_strrchr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN) {}
+function mb_strrchr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN): string|false {}
-/** @return string|false */
-function mb_stristr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN) {}
+function mb_stristr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN): string|false {}
-/** @return string|false */
-function mb_strrichr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN) {}
+function mb_strrichr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN): string|false {}
-/** @return int|false */
-function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN) {}
+function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN): int|false {}
-/** @return string|false */
-function mb_substr(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN) {}
+function mb_substr(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string|false {}
-/** @return string|false */
-function mb_strcut(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN) {}
+function mb_strcut(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string|false {}
-/** @return int|false */
-function mb_strwidth(string $str, string $encoding = UNKNOWN) {}
+function mb_strwidth(string $str, string $encoding = UNKNOWN): int|false {}
-/** @return string|false */
-function mb_strimwidth(string $str, int $start, int $width, string $trimmarker = UNKNOWN, string $encoding = UNKNOWN) {}
+function mb_strimwidth(string $str, int $start, int $width, string $trimmarker = UNKNOWN, string $encoding = UNKNOWN): string|false {}
-/**
- * @param array|string $str
- * @return array|string|false
- */
-function mb_convert_encoding($str, string $to, $from = UNKNOWN) {}
+/** @param array|string $str */
+function mb_convert_encoding($str, string $to, $from = UNKNOWN): array|string|false {}
-/** @return string|false */
-function mb_convert_case(string $sourcestring, int $mode, ?string $encoding = null) {}
+function mb_convert_case(string $sourcestring, int $mode, ?string $encoding = null): string|false {}
-/** @return string|false */
-function mb_strtoupper(string $sourcestring, ?string $encoding = null) {}
+function mb_strtoupper(string $sourcestring, ?string $encoding = null): string|false {}
-/** @return string|false */
-function mb_strtolower(string $sourcestring, ?string $encoding = null) {}
+function mb_strtolower(string $sourcestring, ?string $encoding = null): string|false {}
-/**
- * @param array|string $encoding_list
- * @return string|false
- */
-function mb_detect_encoding(string $str, $encoding_list = null, bool $strict = false) {}
+/** @param array|string $encoding_list */
+function mb_detect_encoding(string $str, $encoding_list = null, bool $strict = false): string|false {}
function mb_list_encodings(): array {}
-/** @return array|false */
-function mb_encoding_aliases(string $encoding) {}
+function mb_encoding_aliases(string $encoding): array|false {}
-/** @return string|false */
-function mb_encode_mimeheader(string $str, string $charset = UNKNOWN, string $transfer = UNKNOWN, string $linefeed = UNKNOWN, int $indent = 0) {}
+function mb_encode_mimeheader(string $str, string $charset = UNKNOWN, string $transfer = UNKNOWN, string $linefeed = UNKNOWN, int $indent = 0): string|false {}
-/** @return string|false */
-function mb_decode_mimeheader(string $string) {}
+function mb_decode_mimeheader(string $string): string|false {}
-/** @return string|false */
-function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding = UNKNOWN) {}
+function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding = UNKNOWN): string|false {}
-/**
- * @param array|string $from
- * @return string|false
- */
-function mb_convert_variables(string $to, $from, &$var, &...$vars) {}
+/** @param array|string $from */
+function mb_convert_variables(string $to, $from, &$var, &...$vars): string|false {}
-/** @return string|false */
-function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false) {}
+function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false): string|false {}
-/** @return string|false */
-function mb_decode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN) {}
+function mb_decode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN): string|false {}
function mb_send_mail(string $to, string $subject, string $message, $additional_headers = UNKNOWN, string $additional_parameters = UNKNOWN): bool {}
-/** @return array|string|int|false */
-function mb_get_info(string $type = UNKNOWN) {}
+function mb_get_info(string $type = UNKNOWN): array|string|int|false {}
function mb_check_encoding($var = UNBEK, string $encoding = UNKNOWN): bool {}
-/** @return string|false */
-function mb_scrub(string $str, string $encoding = UNKNOWN) {}
+function mb_scrub(string $str, string $encoding = UNKNOWN): string|false {}
-/** @return int|false */
-function mb_ord(string $str, string $encoding = UNKNOWN) {}
+function mb_ord(string $str, string $encoding = UNKNOWN): int|false {}
-/** @return string|false */
-function mb_chr(int $cp, string $encoding = UNKNOWN) {}
+function mb_chr(int $cp, string $encoding = UNKNOWN): string|false {}
#if HAVE_MBREGEX
-/** @return string|bool */
-function mb_regex_encoding(string $encoding = UNKNOWN) {}
+function mb_regex_encoding(string $encoding = UNKNOWN): string|bool {}
-/** @return int|false */
-function mb_ereg(string $pattern, string $string, &$registers = UNKNOWN) {}
+function mb_ereg(string $pattern, string $string, &$registers = UNKNOWN): int|false {}
-/** @return int|false */
-function mb_eregi(string $pattern, string $string, &$registers = UNKNOWN) {}
+function mb_eregi(string $pattern, string $string, &$registers = UNKNOWN): int|false {}
-/** @return string|false|null */
-function mb_ereg_replace(string $pattern, string $replacement, string $string, string $option = UNKNOWN) {}
+function mb_ereg_replace(string $pattern, string $replacement, string $string, string $option = UNKNOWN): string|false|null {}
-/** @return string|false|null */
-function mb_eregi_replace(string $pattern, string $replacement, string $string, string $option = UNKNOWN) {}
+function mb_eregi_replace(string $pattern, string $replacement, string $string, string $option = UNKNOWN): string|false|null {}
-/** @return string|false|null */
-function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $option = UNKNOWN) {}
+function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $option = UNKNOWN): string|false|null {}
-/** @return array|false */
-function mb_split(string $pattern, string $string, int $limit = -1) {}
+function mb_split(string $pattern, string $string, int $limit = -1): array|false {}
function mb_ereg_match(string $pattern, string $string, string $option = UNKNOWN): bool {}
-/** @return array|bool */
-function mb_ereg_search(string $pattern = UNKNOWN, string $option = UNKNOWN) {}
+function mb_ereg_search(string $pattern = UNKNOWN, string $option = UNKNOWN): array|bool {}
-/** @return array|bool */
-function mb_ereg_search_pos(string $pattern = UNKNOWN, string $option = UNKNOWN) {}
+function mb_ereg_search_pos(string $pattern = UNKNOWN, string $option = UNKNOWN): array|bool {}
-/** @return array|bool */
-function mb_ereg_search_regs(string $pattern = UNKNOWN, string $option = UNKNOWN) {}
+function mb_ereg_search_regs(string $pattern = UNKNOWN, string $option = UNKNOWN): array|bool {}
function mb_ereg_search_init(string $string, string $pattern = UNKNOWN, string $option = UNKNOWN): bool {}
-/** @return array|false */
-function mb_ereg_search_getregs() {}
+function mb_ereg_search_getregs(): array|false {}
function mb_ereg_search_getpos(): int {}
diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h
index 6697236c8b..0fd3034bd9 100644
--- a/ext/mbstring/mbstring_arginfo.h
+++ b/ext/mbstring/mbstring_arginfo.h
@@ -1,28 +1,28 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_language, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_internal_encoding, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_internal_encoding, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_http_input, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_http_input, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_mb_http_output arginfo_mb_internal_encoding
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_detect_order, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_order, 0, 0, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_INFO(0, encoding)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_substitute_character, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substitute_character, 0, 0, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_BOOL)
ZEND_ARG_INFO(0, substchar)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_preferred_mime_name, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_preferred_mime_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -36,25 +36,25 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_output_handler, 0, 2, IS_STRI
ZEND_ARG_TYPE_INFO(0, status, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_str_split, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_str_split, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, split_length, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strlen, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strpos, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strrpos, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strrpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_INFO(0, offset)
@@ -65,7 +65,7 @@ ZEND_END_ARG_INFO()
#define arginfo_mb_strripos arginfo_mb_strpos
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strstr, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, part, _IS_BOOL, 0)
@@ -78,13 +78,13 @@ ZEND_END_ARG_INFO()
#define arginfo_mb_strrichr arginfo_mb_strstr
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_substr_count, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substr_count, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_substr, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1)
@@ -95,7 +95,7 @@ ZEND_END_ARG_INFO()
#define arginfo_mb_strwidth arginfo_mb_strlen
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strimwidth, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strimwidth, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, width, IS_LONG, 0)
@@ -103,26 +103,26 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strimwidth, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_encoding, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, str)
ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
ZEND_ARG_INFO(0, from)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_case, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_case, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, sourcestring, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_strtoupper, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strtoupper, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, sourcestring, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 1)
ZEND_END_ARG_INFO()
#define arginfo_mb_strtolower arginfo_mb_strtoupper
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_detect_encoding, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_encoding, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_INFO(0, encoding_list)
ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0)
@@ -131,9 +131,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_list_encodings, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-#define arginfo_mb_encoding_aliases arginfo_mb_preferred_mime_name
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encoding_aliases, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_encode_mimeheader, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_mimeheader, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, transfer, IS_STRING, 0)
@@ -141,31 +143,31 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_encode_mimeheader, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, indent, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_decode_mimeheader, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_decode_mimeheader, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_kana, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_kana, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_variables, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_variables, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
ZEND_ARG_INFO(0, from)
ZEND_ARG_INFO(1, var)
ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_encode_numericentity, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_encode_numericentity, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, is_hex, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_decode_numericentity, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_decode_numericentity, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
@@ -179,30 +181,35 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_send_mail, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, additional_parameters, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_mb_get_info arginfo_mb_http_input
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_check_encoding, 0, 0, _IS_BOOL, 0)
ZEND_ARG_INFO(0, var)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_mb_scrub arginfo_mb_strlen
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_scrub, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
+ZEND_END_ARG_INFO()
#define arginfo_mb_ord arginfo_mb_strlen
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_chr, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_chr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, cp, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_regex_encoding, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_regex_encoding, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_INFO(1, registers)
@@ -214,7 +221,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_replace, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace, 0, 3, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, replacement, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -227,7 +234,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_replace_callback, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace_callback, 0, 3, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -236,7 +243,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_split, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_split, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0)
@@ -252,7 +259,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_search, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search, 0, 0, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -275,7 +282,7 @@ ZEND_END_ARG_INFO()
#endif
#if HAVE_MBREGEX
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_search_getregs, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search_getregs, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php
index 835ea10674..fa7dedd665 100644
--- a/ext/odbc/odbc.stub.php
+++ b/ext/odbc/odbc.stub.php
@@ -17,18 +17,12 @@ function odbc_prepare($connection_id, string $query) {}
/** @param resource $result_id */
function odbc_execute($result_id, array $parameters_array = UNKNOWN): bool {}
-/**
- * @param resource $result_id
- * @return string|false
- */
-function odbc_cursor($result_id) {}
+/** @param resource $result_id */
+function odbc_cursor($result_id): string|false {}
#ifdef HAVE_SQLDATASOURCES
-/**
- * @param resource $connection_id
- * @return array|false
- */
-function odbc_data_source($connection_id, int $fetch_type) {}
+/** @param resource $connection_id */
+function odbc_data_source($connection_id, int $fetch_type): array|false {}
#endif
/**
@@ -50,18 +44,12 @@ function odbc_do($connection_id, string $query, int $flags = UNKNOWN) {}
*/
function odbc_fetch_object($result, int $rownumber = -1) {}
-/**
- * @param resource $result
- * @return array|false
- */
-function odbc_fetch_array($result, int $rownumber = -1) {}
+/** @param resource $result */
+function odbc_fetch_array($result, int $rownumber = -1): array|false {}
#endif
-/**
- * @param resource $result_id
- * @return int|false
- */
-function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0) {}
+/** @param resource $result_id */
+function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0): int|false {}
/** @param resource $result_id */
function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {}
@@ -69,15 +57,11 @@ function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {}
/**
* @param resource $result_id
* @param string|int $field
- * @return string|bool|null
*/
-function odbc_result($result_id, $field) {}
+function odbc_result($result_id, $field): string|bool|null {}
-/**
- * @param resource $result_id
- * @return int|false
- */
-function odbc_result_all($result_id, string $format = '') {}
+/** @param resource $result_id */
+function odbc_result_all($result_id, string $format = ''): int|false {}
/** @param resource $result_id */
function odbc_free_result($result_id): bool {}
@@ -102,47 +86,26 @@ function odbc_next_result($result_id): bool {}
/** @param resource $result_id */
function odbc_num_fields($result_id): int {}
-/**
- * @param resource $result_id
- * @return string|false
- */
-function odbc_field_name($result_id, int $field_number) {}
+/** @param resource $result_id */
+function odbc_field_name($result_id, int $field_number): string|false {}
-/**
- * @param resource $result_id
- * @return string|false
- */
-function odbc_field_type($result_id, int $field_number) {}
+/** @param resource $result_id */
+function odbc_field_type($result_id, int $field_number): string|false {}
-/**
- * @param resource $result_id
- * @return int|false
- */
-function odbc_field_len($result_id, int $field_number) {}
+/** @param resource $result_id */
+function odbc_field_len($result_id, int $field_number): int|false {}
-/**
- * @param resource $result_id
- * @return int|false
- */
-function odbc_field_precision($result_id, int $field_number) {}
+/** @param resource $result_id */
+function odbc_field_precision($result_id, int $field_number): int|false {}
-/**
- * @param resource $result_id
- * @return int|false
- */
-function odbc_field_scale($result_id, int $field_number) {}
+/** @param resource $result_id */
+function odbc_field_scale($result_id, int $field_number): int|false {}
-/**
- * @param resource $result_id
- * @return int|false
- */
-function odbc_field_num($result_id, string $field_name) {}
+/** @param resource $result_id */
+function odbc_field_num($result_id, string $field_name): int|false {}
-/**
- * @param resource $connection_id
- * @return int|bool
- */
-function odbc_autocommit($connection_id, int $onoff = 0) {}
+/** @param resource $connection_id */
+function odbc_autocommit($connection_id, int $onoff = 0): int|bool {}
/** @param resource $connection_id */
function odbc_commit($connection_id): bool {}
diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h
index cac9518e84..162d8cfdd1 100644
--- a/ext/odbc/odbc_arginfo.h
+++ b/ext/odbc/odbc_arginfo.h
@@ -23,12 +23,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_execute, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, parameters_array, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_cursor, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_cursor, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, result_id)
ZEND_END_ARG_INFO()
#if defined(HAVE_SQLDATASOURCES)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_data_source, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_data_source, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, connection_id)
ZEND_ARG_TYPE_INFO(0, fetch_type, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -50,10 +50,13 @@ ZEND_END_ARG_INFO()
#endif
#if defined(PHP_ODBC_HAVE_FETCH_HASH)
-#define arginfo_odbc_fetch_array arginfo_odbc_fetch_object
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, result)
+ ZEND_ARG_TYPE_INFO(0, rownumber, IS_LONG, 0)
+ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_fetch_into, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_into, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, result_id)
ZEND_ARG_INFO(1, result_array)
ZEND_ARG_TYPE_INFO(0, rownumber, IS_LONG, 0)
@@ -64,12 +67,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_fetch_row, 0, 1, _IS_BOOL,
ZEND_ARG_TYPE_INFO(0, row_number, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_result, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL)
ZEND_ARG_INFO(0, result_id)
ZEND_ARG_INFO(0, field)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_result_all, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, result_id)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -103,25 +106,28 @@ ZEND_END_ARG_INFO()
#define arginfo_odbc_num_fields arginfo_odbc_num_rows
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_field_name, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, result_id)
ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0)
ZEND_END_ARG_INFO()
#define arginfo_odbc_field_type arginfo_odbc_field_name
-#define arginfo_odbc_field_len arginfo_odbc_field_name
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_len, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, result_id)
+ ZEND_ARG_TYPE_INFO(0, field_number, IS_LONG, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_odbc_field_precision arginfo_odbc_field_name
+#define arginfo_odbc_field_precision arginfo_odbc_field_len
-#define arginfo_odbc_field_scale arginfo_odbc_field_name
+#define arginfo_odbc_field_scale arginfo_odbc_field_len
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_field_num, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_field_num, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, result_id)
ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_autocommit, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_autocommit, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
ZEND_ARG_INFO(0, connection_id)
ZEND_ARG_TYPE_INFO(0, onoff, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/opcache/opcache.stub.php b/ext/opcache/opcache.stub.php
index 4dd312a6cd..a60f237642 100644
--- a/ext/opcache/opcache.stub.php
+++ b/ext/opcache/opcache.stub.php
@@ -2,14 +2,12 @@
function opcache_reset(): bool {}
-/** @return array|false */
-function opcache_get_status(bool $fetch_scripts = true) {}
+function opcache_get_status(bool $fetch_scripts = true): array|false {}
function opcache_compile_file(string $file): bool {}
function opcache_invalidate(string $script, bool $force = false): bool {}
-/** @return array|false */
-function opcache_get_configuration() {}
+function opcache_get_configuration(): array|false {}
function opcache_is_script_cached(string $script): bool {}
diff --git a/ext/opcache/opcache_arginfo.h b/ext/opcache/opcache_arginfo.h
index 7f80ba4b69..1b6ff24283 100644
--- a/ext/opcache/opcache_arginfo.h
+++ b/ext/opcache/opcache_arginfo.h
@@ -3,7 +3,7 @@
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_reset, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_opcache_get_status, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_opcache_get_status, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, fetch_scripts, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -16,7 +16,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_invalidate, 0, 1, _IS_BO
ZEND_ARG_TYPE_INFO(0, force, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_opcache_get_configuration, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_opcache_get_configuration, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_opcache_is_script_cached, 0, 1, _IS_BOOL, 0)
diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php
index 484e8c6bd7..e75f79c906 100644
--- a/ext/openssl/openssl.stub.php
+++ b/ext/openssl/openssl.stub.php
@@ -4,24 +4,20 @@ function openssl_x509_export_to_file($x509, string $outfilename, bool $notext =
function openssl_x509_export($x509 , &$out, bool $notext = true): bool {}
-/** @return string|false */
-function openssl_x509_fingerprint($x509, string $method = 'sha1', bool $raw_output = false) {}
+function openssl_x509_fingerprint($x509, string $method = 'sha1', bool $raw_output = false): string|false {}
function openssl_x509_check_private_key($cert, $key): bool {}
function openssl_x509_verify($cert, $key): int {}
-/** @return array|false */
-function openssl_x509_parse($x509, bool $shortname = true) {}
+function openssl_x509_parse($x509, bool $shortname = true): array|false {}
-/** @return bool|int */
-function openssl_x509_checkpurpose($x509cert, int $purpose, ?array $cainfo = [], string $untrustedfile = UNKNOWN) {}
+function openssl_x509_checkpurpose($x509cert, int $purpose, ?array $cainfo = [], string $untrustedfile = UNKNOWN): bool|int {}
/** @return resource|false */
function openssl_x509_read($cert) {}
-/** @return false|void */
-function openssl_x509_free($x509) {}
+function openssl_x509_free($x509): ?bool {}
/**
* @param resource|string $x509cert
@@ -54,11 +50,8 @@ function openssl_csr_sign($csr, $cacert = null, $priv_key, int $days, ?array $co
/** @return resource|false */
function openssl_csr_new(array $dn, &$privkey, ?array $configargs = null, ?array $extraattribs = null) {}
-/**
- * @param resource|string $csr
- * @return array|false
- */
-function openssl_csr_get_subject($csr, bool $use_shortnames = true) {}
+/** @param resource|string $csr */
+function openssl_csr_get_subject($csr, bool $use_shortnames = true): array|false {}
/**
* @param resource|string $csr
@@ -75,7 +68,7 @@ function openssl_pkey_export_to_file($key, string $outfilename, ?string $passphr
/** @param resource|string|array $key */
function openssl_pkey_export($key, &$out, ?string $passphrase = null, ?array $configargs = null): bool {}
-/**
+/**
* @param resource|string|array $cert
* @return resource|false
*/
@@ -90,17 +83,12 @@ function openssl_pkey_free($key): void {}
*/
function openssl_pkey_get_private($key, string $passphrase = UNKNOWN) {}
-/**
- * @param resource $key
- * @return array|false
- */
-function openssl_pkey_get_details($key) {}
+/** @param resource $key */
+function openssl_pkey_get_details($key): array|false {}
-/** @return string|false */
-function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algorithm = 'sha1') {}
+function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algorithm = 'sha1'): string|false {}
-/** @return bool|int */
-function openssl_pkcs7_verify(string $filename, int $flags, string $signerscerts = UNKNOWN, array $cainfo = UNKNOWN, string $extracerts = UNKNOWN, string $content = UNKNOWN, string $pk7 = UNKNOWN) {}
+function openssl_pkcs7_verify(string $filename, int $flags, string $signerscerts = UNKNOWN, array $cainfo = UNKNOWN, string $extracerts = UNKNOWN, string $content = UNKNOWN, string $pk7 = UNKNOWN): bool|int {}
/** @param resource|string|array $recipcerts */
function openssl_pkcs7_encrypt(string $infile, string $outfile, $recipcerts, ?array $headers, int $flags = 0, int $cipher = OPENSSL_CIPHER_RC2_40): bool {}
@@ -131,8 +119,7 @@ function openssl_public_encrypt(string $data, &$crypted, $key, int $padding = OP
/** @param resource|string|array $key */
function openssl_public_decrypt(string $data, &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): bool {}
-/** @return string|false */
-function openssl_error_string() {}
+function openssl_error_string(): string|false {}
/**
* @param resource|string|array $key
@@ -143,12 +130,10 @@ function openssl_sign(string $data, &$signature, $key, $method = OPENSSL_ALGO_SH
/**
* @param resource|string|array $key
* @param int|string $method
- * @return int|false
*/
-function openssl_verify(string $data, string $signature, $key, $method = OPENSSL_ALGO_SHA1) {}
+function openssl_verify(string $data, string $signature, $key, $method = OPENSSL_ALGO_SHA1): int|false {}
-/** @return int|false */
-function openssl_seal(string $data, &$sealdata, &$ekeys, array $pubkeys, string $method = UNKNOWN, &$iv = UNKNOWN) {}
+function openssl_seal(string $data, &$sealdata, &$ekeys, array $pubkeys, string $method = UNKNOWN, &$iv = UNKNOWN): int|false {}
/** @param resource|string|array $privkey */
function openssl_open(string $data, &$opendata, string $ekey, $privkey, string $method = UNKNOWN, string $iv = UNKNOWN): bool {}
@@ -158,49 +143,35 @@ function openssl_get_md_methods($aliases = false): array {}
function openssl_get_cipher_methods($aliases = false): array {}
#ifdef HAVE_EVP_PKEY_EC
-/** @return array|false */
-function openssl_get_curve_names() {}
+function openssl_get_curve_names(): array|false {}
#endif
-/** @return string|false */
-function openssl_digest(string $data, string $method, bool $raw_output = false) {}
+function openssl_digest(string $data, string $method, bool $raw_output = false): string|false {}
-/** @return string|false */
-function openssl_encrypt(string $data, string $method, string $password, int $options = 0, string $iv = '', &$tag = UNKNOWN, string $aad = '', int $tag_length = 16) {}
+function openssl_encrypt(string $data, string $method, string $password, int $options = 0, string $iv = '', &$tag = UNKNOWN, string $aad = '', int $tag_length = 16): string|false {}
-/** @return string|false */
-function openssl_decrypt(string $data, string $method, string $password, int $options = 0, string $iv = '', string $tag = UNKNOWN, string $aad = '') {}
+function openssl_decrypt(string $data, string $method, string $password, int $options = 0, string $iv = '', string $tag = UNKNOWN, string $aad = ''): string|false {}
-/** @return int|false */
-function openssl_cipher_iv_length(string $method) {}
+function openssl_cipher_iv_length(string $method): int|false {}
-/**
- * @param resource $dh_key
- * @return string|false
- */
-function openssl_dh_compute_key(string $pub_key, $dh_key) {}
+/** @param resource $dh_key */
+function openssl_dh_compute_key(string $pub_key, $dh_key): string|false {}
/**
* @param resource|string|array $peer_pub_key
* @param resource|string|array $priv_key
- * @return string|false
*/
-function openssl_pkey_derive($peer_pub_key, $priv_key, int $keylen = 0) {}
+function openssl_pkey_derive($peer_pub_key, $priv_key, int $keylen = 0): string|false {}
function openssl_random_pseudo_bytes(int $length, &$result_is_strong = UNKNOWN): string {}
-/**
- * @param resource $privkey
- * @return string|false
- */
-function openssl_spki_new($privkey, string $challenge, int $algo = OPENSSL_ALGO_MD5) {}
+/** @param resource $privkey */
+function openssl_spki_new($privkey, string $challenge, int $algo = OPENSSL_ALGO_MD5): string|false {}
function openssl_spki_verify(string $spki): bool {}
-/** @return string|false */
-function openssl_spki_export(string $spki) {}
+function openssl_spki_export(string $spki): string|false {}
-/** @return string|false */
-function openssl_spki_export_challenge(string $spki) {}
+function openssl_spki_export_challenge(string $spki): string|false {}
function openssl_get_cert_locations(): array {}
diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h
index d14215bb25..9f8835ec13 100644
--- a/ext/openssl/openssl_arginfo.h
+++ b/ext/openssl/openssl_arginfo.h
@@ -12,7 +12,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export, 0, 2, _IS_B
ZEND_ARG_TYPE_INFO(0, notext, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_fingerprint, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_fingerprint, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, x509)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0)
@@ -28,12 +28,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_verify, 0, 2, IS_LO
ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_parse, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_parse, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, x509)
ZEND_ARG_TYPE_INFO(0, shortname, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_checkpurpose, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_x509_checkpurpose, 0, 2, MAY_BE_BOOL|MAY_BE_LONG)
ZEND_ARG_INFO(0, x509cert)
ZEND_ARG_TYPE_INFO(0, purpose, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, cainfo, IS_ARRAY, 1)
@@ -44,7 +44,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_read, 0, 0, 1)
ZEND_ARG_INFO(0, cert)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_free, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_free, 0, 1, _IS_BOOL, 1)
ZEND_ARG_INFO(0, x509)
ZEND_END_ARG_INFO()
@@ -98,12 +98,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_new, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, extraattribs, IS_ARRAY, 1)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_subject, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_csr_get_subject, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, csr)
ZEND_ARG_TYPE_INFO(0, use_shortnames, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-#define arginfo_openssl_csr_get_public_key arginfo_openssl_csr_get_subject
+ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_public_key, 0, 0, 1)
+ ZEND_ARG_INFO(0, csr)
+ ZEND_ARG_TYPE_INFO(0, use_shortnames, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_new, 0, 0, 0)
ZEND_ARG_TYPE_INFO(0, configargs, IS_ARRAY, 1)
@@ -134,11 +137,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_get_private, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, passphrase, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_get_details, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkey_get_details, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pbkdf2, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pbkdf2, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, key_length, IS_LONG, 0)
@@ -146,7 +149,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pbkdf2, 0, 0, 4)
ZEND_ARG_TYPE_INFO(0, digest_algorithm, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_verify, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkcs7_verify, 0, 2, MAY_BE_BOOL|MAY_BE_LONG)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, signerscerts, IS_STRING, 0)
@@ -200,7 +203,7 @@ ZEND_END_ARG_INFO()
#define arginfo_openssl_public_decrypt arginfo_openssl_private_encrypt
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_error_string, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_error_string, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_sign, 0, 3, _IS_BOOL, 0)
@@ -210,14 +213,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_sign, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_verify, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_verify, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, signature, IS_STRING, 0)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_seal, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_seal, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_INFO(1, sealdata)
ZEND_ARG_INFO(1, ekeys)
@@ -242,17 +245,17 @@ ZEND_END_ARG_INFO()
#define arginfo_openssl_get_cipher_methods arginfo_openssl_get_md_methods
#if defined(HAVE_EVP_PKEY_EC)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_get_curve_names, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_get_curve_names, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_digest, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_digest, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_encrypt, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_encrypt, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
@@ -263,7 +266,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_encrypt, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, tag_length, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_decrypt, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_decrypt, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
@@ -273,16 +276,16 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_decrypt, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, aad, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_cipher_iv_length, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_cipher_iv_length, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_dh_compute_key, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_dh_compute_key, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pub_key, IS_STRING, 0)
ZEND_ARG_INFO(0, dh_key)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_derive, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_pkey_derive, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, peer_pub_key)
ZEND_ARG_INFO(0, priv_key)
ZEND_ARG_TYPE_INFO(0, keylen, IS_LONG, 0)
@@ -293,7 +296,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_random_pseudo_bytes, 0,
ZEND_ARG_INFO(1, result_is_strong)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_spki_new, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_spki_new, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, privkey)
ZEND_ARG_TYPE_INFO(0, challenge, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
@@ -303,7 +306,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_spki_verify, 0, 1, _IS_B
ZEND_ARG_TYPE_INFO(0, spki, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_spki_export, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_spki_export, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, spki, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php
index 1bb1f69709..7ca872663a 100644
--- a/ext/pcntl/pcntl.stub.php
+++ b/ext/pcntl/pcntl.stub.php
@@ -22,11 +22,9 @@ function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {}
#ifdef HAVE_STRUCT_SIGINFO_T
#if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
-/** @return int|false */
-function pcntl_sigwaitinfo(array $set, &$info = []) {}
+function pcntl_sigwaitinfo(array $set, &$info = []): int|false {}
-/** @return int|false */
-function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0) {}
+function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}
#endif
#endif
@@ -40,16 +38,12 @@ function pcntl_wifcontinued(int $status): bool {}
function pcntl_wifsignaled(int $status): bool {}
-/** @return int|false */
-function pcntl_wifexitstatus(int $status) {}
+function pcntl_wifexitstatus(int $status): int|false {}
-/** @return int|false */
-function pcntl_wtermsig(int $status) {}
+function pcntl_wtermsig(int $status): int|false {}
-/** @return int|false */
-function pcntl_wstopsig(int $status) {}
+function pcntl_wstopsig(int $status): int|false {}
-/** @return false */
function pcntl_exec(string $path, array $args = [], array $envs = []): bool {}
function pcntl_alarm(int $seconds): int {}
@@ -57,8 +51,7 @@ function pcntl_alarm(int $seconds): int {}
function pcntl_get_last_error(): int {}
#ifdef HAVE_GETPRIORITY
-/** @return int|false */
-function pcntl_getpriority(int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS) {}
+function pcntl_getpriority(int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS): int|false {}
#endif
#ifdef HAVE_SETPRIORITY
diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h
index 21a1c6aabd..7fc37ab4ec 100644
--- a/ext/pcntl/pcntl_arginfo.h
+++ b/ext/pcntl/pcntl_arginfo.h
@@ -38,14 +38,14 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_sigwaitinfo, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigwaitinfo, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
ZEND_ARG_INFO(1, info)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_sigtimedwait, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigtimedwait, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
ZEND_ARG_INFO(1, info)
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -67,7 +67,7 @@ ZEND_END_ARG_INFO()
#define arginfo_pcntl_wifsignaled arginfo_pcntl_wifexited
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_wifexitstatus, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_wifexitstatus, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, status, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -88,7 +88,7 @@ ZEND_END_ARG_INFO()
#define arginfo_pcntl_get_last_error arginfo_pcntl_fork
#if defined(HAVE_GETPRIORITY)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_getpriority, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_getpriority, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, process_identifier, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/pcre/php_pcre.stub.php b/ext/pcre/php_pcre.stub.php
index 8a97cb4516..397ab22159 100644
--- a/ext/pcre/php_pcre.stub.php
+++ b/ext/pcre/php_pcre.stub.php
@@ -1,52 +1,39 @@
<?php
-/** @return int|false */
-function preg_match(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0) {}
+function preg_match(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0): int|false {}
-/** @return int|false */
-function preg_match_all(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0) {}
+function preg_match_all(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0): int|false|null {}
/**
* @param string|array $regex
* @param string|array $replace
* @param string|array $subject
- * @return string|array|null
*/
-function preg_replace($regex, $replace, $subject, int $limit = -1, &$count = null) {}
+function preg_replace($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {}
/**
* @param string|array $regex
* @param string|array $replace
* @param string|array $subject
- * @return string|array|null
*/
-function preg_filter($regex, $replace, $subject, int $limit = -1, &$count = null) {}
+function preg_filter($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {}
/**
* @param string|array $regex
* @param string|array $subject
- * @return string|array|null
*
* TODO: $callback should be `callable`
*/
-function preg_replace_callback($regex, $callback, $subject, int $limit = -1, &$count = null, int $flags = 0) {}
+function preg_replace_callback($regex, $callback, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
-/**
- * @param string|array $subject
- * @return string|array|null
- */
-function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, &$count = null, int $flags = 0) {}
+/** @param string|array $subject */
+function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
-/**
- * @return array|false
- */
-function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0) {}
+function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array|false {}
function preg_quote(string $str, ?string $delim_char = null): string {}
-/** @return array|false */
-function preg_grep(string $regex, array $input, int $flags = 0) {}
-
+function preg_grep(string $regex, array $input, int $flags = 0): array|false {}
function preg_last_error(): int {}
diff --git a/ext/pcre/php_pcre_arginfo.h b/ext/pcre/php_pcre_arginfo.h
index aff71e652a..4c7308baab 100644
--- a/ext/pcre/php_pcre_arginfo.h
+++ b/ext/pcre/php_pcre_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match, 0, 0, 2)
+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)
ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
ZEND_ARG_INFO(1, subpatterns)
@@ -8,9 +8,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_preg_match_all arginfo_preg_match
+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(1, subpatterns)
+ ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL)
ZEND_ARG_INFO(0, regex)
ZEND_ARG_INFO(0, replace)
ZEND_ARG_INFO(0, subject)
@@ -20,7 +26,7 @@ ZEND_END_ARG_INFO()
#define arginfo_preg_filter arginfo_preg_replace
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace_callback, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace_callback, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL)
ZEND_ARG_INFO(0, regex)
ZEND_ARG_INFO(0, callback)
ZEND_ARG_INFO(0, subject)
@@ -29,7 +35,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace_callback, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace_callback_array, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace_callback_array, 0, 2, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, pattern, IS_ARRAY, 0)
ZEND_ARG_INFO(0, subject)
ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0)
@@ -37,7 +43,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_replace_callback_array, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_split, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_split, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0)
@@ -49,7 +55,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_preg_quote, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, delim_char, IS_STRING, 1)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_grep, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_grep, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, regex, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, input, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
diff --git a/ext/posix/posix.stub.php b/ext/posix/posix.stub.php
index 625a087de6..008d35f689 100644
--- a/ext/posix/posix.stub.php
+++ b/ext/posix/posix.stub.php
@@ -27,13 +27,11 @@ function posix_setegid(int $gid): bool {}
#endif
#ifdef HAVE_GETGROUPS
-/** @return array|false */
-function posix_getgroups() {}
+function posix_getgroups(): array|false {}
#endif
#ifdef HAVE_GETLOGIN
-/** @return string|false */
-function posix_getlogin() {}
+function posix_getlogin(): string|false {}
#endif
function posix_getpgrp(): int {}
@@ -45,36 +43,27 @@ function posix_setsid(): int {}
function posix_setpgid(int $pid, int $pgid): bool {}
#ifdef HAVE_GETPGID
-/** @return int|false */
-function posix_getpgid(int $pid) {}
+function posix_getpgid(int $pid): int|false {}
#endif
#ifdef HAVE_GETSID
-/** @return int|false */
-function posix_getsid(int $pid) {}
+function posix_getsid(int $pid): int|false {}
#endif
-/** @return array|false */
-function posix_uname() {}
+function posix_uname(): array|false {}
-/** @return array|false */
-function posix_times() {}
+function posix_times(): array|false {}
#ifdef HAVE_CTERMID
-/** @return string|false */
-function posix_ctermid() {}
+function posix_ctermid(): string|false {}
#endif
-/**
- * @return string|false
- */
-function posix_ttyname($fd) {}
+function posix_ttyname($fd): string|false {}
function posix_isatty($fd): bool {}
-/** @return string|false */
-function posix_getcwd() {}
+function posix_getcwd(): string|false {}
#ifdef HAVE_MKFIFO
function posix_mkfifo(string $pathname, int $mode): bool {}
@@ -86,21 +75,16 @@ function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0
function posix_access(string $file, int $mode = 0): bool {}
-/** @return array|false */
-function posix_getgrnam(string $name) {}
+function posix_getgrnam(string $name): array|false {}
-/** @return array|false */
-function posix_getgrgid(int $gid) {}
+function posix_getgrgid(int $gid): array|false {}
-/** @return array|false */
-function posix_getpwnam(string $username) {}
+function posix_getpwnam(string $username): array|false {}
-/** @return array|false */
-function posix_getpwuid(int $uid) {}
+function posix_getpwuid(int $uid): array|false {}
#ifdef HAVE_GETRLIMIT
-/** @return array|false */
-function posix_getrlimit() {}
+function posix_getrlimit(): array|false {}
#endif
#ifdef HAVE_SETRLIMIT
diff --git a/ext/posix/posix_arginfo.h b/ext/posix/posix_arginfo.h
index 91042fb692..8997b409bf 100644
--- a/ext/posix/posix_arginfo.h
+++ b/ext/posix/posix_arginfo.h
@@ -39,12 +39,12 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETGROUPS)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgroups, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgroups, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETLOGIN)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getlogin, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getlogin, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
@@ -61,28 +61,28 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_setpgid, 0, 2, _IS_BOOL, 0
ZEND_END_ARG_INFO()
#if defined(HAVE_GETPGID)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpgid, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getpgid, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETSID)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getsid, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getsid, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_uname, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_uname, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#define arginfo_posix_times arginfo_posix_uname
#if defined(HAVE_CTERMID)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_ctermid, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_ctermid, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_ttyname, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_ttyname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, fd)
ZEND_END_ARG_INFO()
@@ -90,7 +90,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_isatty, 0, 1, _IS_BOOL, 0)
ZEND_ARG_INFO(0, fd)
ZEND_END_ARG_INFO()
-#define arginfo_posix_getcwd arginfo_posix_uname
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getcwd, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
#if defined(HAVE_MKFIFO)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_mkfifo, 0, 2, _IS_BOOL, 0)
@@ -113,24 +114,24 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_access, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgrnam, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgrnam, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgrgid, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgrgid, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, gid, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpwnam, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getpwnam, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpwuid, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getpwuid, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, uid, IS_LONG, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_GETRLIMIT)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getrlimit, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getrlimit, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
diff --git a/ext/pspell/pspell.stub.php b/ext/pspell/pspell.stub.php
index 4d33d789f3..bf49093e85 100644
--- a/ext/pspell/pspell.stub.php
+++ b/ext/pspell/pspell.stub.php
@@ -1,18 +1,14 @@
<?php
-/** @return int|false */
-function pspell_new(string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, int $mode = 0) {}
+function pspell_new(string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, int $mode = 0): int|false {}
-/** @return int|false */
-function pspell_new_personal(string $personal, string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, $mode = 0) {}
+function pspell_new_personal(string $personal, string $language, string $spelling = UNKNOWN, string $jargon = UNKNOWN, string $encoding = UNKNOWN, $mode = 0): int|false {}
-/** @return int|false */
-function pspell_new_config(int $config) {}
+function pspell_new_config(int $config): int|false {}
function pspell_check(int $pspell, string $word): bool {}
-/** @return array|false */
-function pspell_suggest(int $pspell, string $word) {}
+function pspell_suggest(int $pspell, string $word): array|false {}
function pspell_store_replacement(int $pspell, string $misspell, string $correct): bool {}
diff --git a/ext/pspell/pspell_arginfo.h b/ext/pspell/pspell_arginfo.h
index e406fb20a8..688aea3f6f 100644
--- a/ext/pspell/pspell_arginfo.h
+++ b/ext/pspell/pspell_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, jargon, IS_STRING, 0)
@@ -8,7 +8,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_personal, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_personal, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, spelling, IS_STRING, 0)
@@ -17,7 +17,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_personal, 0, 0, 2)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_new_config, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_config, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -26,7 +26,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_check, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pspell_suggest, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_suggest, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/readline/readline.stub.php b/ext/readline/readline.stub.php
index ba157b54e4..ed383561d1 100644
--- a/ext/readline/readline.stub.php
+++ b/ext/readline/readline.stub.php
@@ -1,7 +1,6 @@
<?php
-/** @return string|false */
-function readline(?string $prompt = null) {}
+function readline(?string $prompt = null): string|false {}
/** @return mixed */
function readline_info(string $varname = UNKNOWN, string $newvalue = UNKNOWN) {}
diff --git a/ext/readline/readline_arginfo.h b/ext/readline/readline_arginfo.h
index 43c8fbccbd..b57a41d900 100644
--- a/ext/readline/readline_arginfo.h
+++ b/ext/readline/readline_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_readline, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, prompt, IS_STRING, 1)
ZEND_END_ARG_INFO()
diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php
index 51c5b47bdb..e343fc8901 100644
--- a/ext/session/session.stub.php
+++ b/ext/session/session.stub.php
@@ -1,33 +1,26 @@
<?php
-/** @return string|false */
-function session_name(string $name = UNKNOWN) {}
+function session_name(string $name = UNKNOWN): string|false {}
-/** @return string|false */
-function session_module_name(string $module = UNKNOWN) {}
+function session_module_name(string $module = UNKNOWN): string|false {}
-/** @return string|false */
-function session_save_path(string $path = UNKNOWN) {}
+function session_save_path(string $path = UNKNOWN): string|false {}
-/** @return string|false */
-function session_id(string $id = UNKNOWN) {}
+function session_id(string $id = UNKNOWN): string|false {}
-/** @return string|false */
-function session_create_id(string $prefix = "") {}
+function session_create_id(string $prefix = ""): string|false {}
function session_regenerate_id(bool $delete_old_session = false): bool {}
function session_decode(string $data): bool {}
-/** @return string|false */
-function session_encode() {}
+function session_encode(): string|false {}
function session_destroy(): bool {}
function session_unset(): bool {}
-/** @return int|false */
-function session_gc() {}
+function session_gc(): int|false {}
function session_get_cookie_params(): array {}
@@ -45,11 +38,9 @@ function session_commit(): bool {}
function session_set_save_handler($open, $close = null, $read = null, $write = null, $destroy = null, $gc = null, $create_sid = null, $validate_sid = null, $update_timestamp = null): bool {}
-/** @return string|false */
-function session_cache_limiter(string $cache_limiter = UNKNOWN) {}
+function session_cache_limiter(string $cache_limiter = UNKNOWN): string|false {}
-/** @return int|false */
-function session_cache_expire(?int $new_cache_expire = null) {}
+function session_cache_expire(?int $new_cache_expire = null): int|false {}
function session_set_cookie_params($lifetime_or_options, string $path = UNKNOWN, string $domain = "", ?bool $secure = null, ?bool $httponly = null): bool {}
diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h
index f13a641edc..60c17c1916 100644
--- a/ext/session/session_arginfo.h
+++ b/ext/session/session_arginfo.h
@@ -1,22 +1,22 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_name, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_module_name, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_module_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, module, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_save_path, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_save_path, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_id, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_id, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_create_id, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_create_id, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -28,7 +28,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_decode, 0, 1, _IS_BOOL,
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_encode, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_encode, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_destroy, 0, 0, _IS_BOOL, 0)
@@ -36,7 +36,8 @@ ZEND_END_ARG_INFO()
#define arginfo_session_unset arginfo_session_destroy
-#define arginfo_session_gc arginfo_session_encode
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_gc, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_get_cookie_params, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
@@ -67,11 +68,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_save_handler, 0, 1,
ZEND_ARG_INFO(0, update_timestamp)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_cache_limiter, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_limiter, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, cache_limiter, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_session_cache_expire, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_expire, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, new_cache_expire, IS_LONG, 1)
ZEND_END_ARG_INFO()
@@ -92,7 +93,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_open, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, session_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_SessionHandlerInterface_close arginfo_session_encode
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_close, 0, 0, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_read, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
@@ -109,7 +111,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_gc, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_SessionIdInterface_create_sid arginfo_session_encode
+#define arginfo_class_SessionIdInterface_create_sid arginfo_class_SessionHandlerInterface_close
#define arginfo_class_SessionUpdateTimestampHandlerInterface_validateId arginfo_class_SessionHandlerInterface_read
diff --git a/ext/shmop/shmop.stub.php b/ext/shmop/shmop.stub.php
index 11a65fc728..8ee2eeba9d 100644
--- a/ext/shmop/shmop.stub.php
+++ b/ext/shmop/shmop.stub.php
@@ -3,29 +3,17 @@
/** @return resource|false */
function shmop_open(int $key, string $flags, int $mode, int $size) {}
-/**
- * @param resource $shmid
- * @return string|false
- */
-function shmop_read($shmid, int $start, int $count) {}
+/** @param resource $shmid */
+function shmop_read($shmid, int $start, int $count): string|false {}
-/**
- * @param resource $shmid
- */
+/** @param resource $shmid */
function shmop_close($shmid): void {}
-/**
- * @param resource $shmid
- */
+/** @param resource $shmid */
function shmop_size($shmid): int {}
-/**
- * @param resource $shmid
- * @return int|false
- */
-function shmop_write($shmid, string $data, int $offset) {}
+/** @param resource $shmid */
+function shmop_write($shmid, string $data, int $offset): int|false {}
-/**
- * @param resource $shmid
- */
+/** @param resource $shmid */
function shmop_delete($shmid): bool {}
diff --git a/ext/shmop/shmop_arginfo.h b/ext/shmop/shmop_arginfo.h
index c91b4ace12..49afa595db 100644
--- a/ext/shmop/shmop_arginfo.h
+++ b/ext/shmop/shmop_arginfo.h
@@ -7,7 +7,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_open, 0, 0, 4)
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_read, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_shmop_read, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, shmid)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
@@ -21,7 +21,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_shmop_size, 0, 1, IS_LONG, 0)
ZEND_ARG_INFO(0, shmid)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_shmop_write, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_shmop_write, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, shmid)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php
index 903ec81570..965a0fbc8d 100644
--- a/ext/snmp/snmp.stub.php
+++ b/ext/snmp/snmp.stub.php
@@ -1,42 +1,26 @@
<?php
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmpget(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmpget(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmpgetnext(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmpgetnext(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmpwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmpwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmprealwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmprealwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmpwalkoid(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmpwalkoid(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
/**
* @param array|string $object_id
* @param array|string $type
* @param array|string $value
- * @return array|bool
*/
-function snmpset(string $host, string $community, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+function snmpset(string $host, string $community, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
function snmp_get_quick_print(): bool {}
@@ -48,69 +32,43 @@ function snmp_set_oid_output_format(int $oid_format): bool {}
function snmp_set_oid_numeric_print(int $oid_format): bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp2_get(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp2_get(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp2_getnext(string $host, string $community, $object_id, int $timeout = UNKOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp2_getnext(string $host, string $community, $object_id, int $timeout = UNKOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp2_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp2_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp2_real_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp2_real_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
/**
* @param array|string $object_id
* @param array|string $type
* @param array|string $value
- * @return array|bool
*/
-function snmp2_set(string $host, string $community, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+function snmp2_set(string $host, string $community, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp3_get(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp3_get(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp3_getnext(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKOWN) {}
+/** @param array|string $object_id */
+function snmp3_getnext(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp3_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp3_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @return array|bool
- */
-function snmp3_real_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+/** @param array|string $object_id */
+function snmp3_real_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
/**
* @param array|string $object_id
* @param array|string $type
* @param array|string $value
- * @return array|bool
*/
-function snmp3_set(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN) {}
+function snmp3_set(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
function snmp_set_valueretrieval(int $method): bool {}
diff --git a/ext/snmp/snmp_arginfo.h b/ext/snmp/snmp_arginfo.h
index f4cbdbc182..fdafded7d3 100644
--- a/ext/snmp/snmp_arginfo.h
+++ b/ext/snmp/snmp_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_snmpget, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmpget, 0, 3, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0)
ZEND_ARG_INFO(0, object_id)
@@ -16,7 +16,7 @@ ZEND_END_ARG_INFO()
#define arginfo_snmpwalkoid arginfo_snmpget
-ZEND_BEGIN_ARG_INFO_EX(arginfo_snmpset, 0, 0, 5)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmpset, 0, 5, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0)
ZEND_ARG_INFO(0, object_id)
@@ -53,7 +53,7 @@ ZEND_END_ARG_INFO()
#define arginfo_snmp2_set arginfo_snmpset
-ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp3_get, 0, 0, 8)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_get, 0, 8, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, sec_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, sec_level, IS_STRING, 0)
@@ -72,7 +72,7 @@ ZEND_END_ARG_INFO()
#define arginfo_snmp3_real_walk arginfo_snmp3_get
-ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp3_set, 0, 0, 10)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_set, 0, 10, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, sec_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, sec_level, IS_STRING, 0)
diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php
index 42abd805b6..d79cb7ac7a 100644
--- a/ext/sockets/sockets.stub.php
+++ b/ext/sockets/sockets.stub.php
@@ -1,14 +1,12 @@
<?php
-/** @return int|false */
-function socket_select(?array &$read_fds, ?array &$write_fds, ?array &$except_fds, ?int $tv_sec, int $tv_usec = 0) {}
+function socket_select(?array &$read_fds, ?array &$write_fds, ?array &$except_fds, ?int $tv_sec, int $tv_usec = 0): int|false {}
/** @return resource|false */
function socket_create_listen(int $port, int $backlog = 128) {}
/**
* @param resource $socket
- *
* @return resource|false
*/
function socket_accept($socket) {}
@@ -25,19 +23,11 @@ function socket_listen($socket, int $backlog = 0): bool {}
/** @param resource $socket */
function socket_close($socket): void {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_write($socket, string $buf, int $length = 0) {}
+/** @param resource $socket */
+function socket_write($socket, string $buf, int $length = 0): int|false {}
-/**
- * @param resource $socket
- *
- * @return string|false
- */
-function socket_read($socket, int $length, int $type = PHP_BINARY_READ) {}
+/** @param resource $socket */
+function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string|false {}
/** @param resource $socket */
function socket_getsockname($socket, &$addr, &$port = UNKNOWN): bool {}
@@ -56,47 +46,26 @@ function socket_strerror(int $errno): string {}
/** @param resource $socket */
function socket_bind($socket, string $addr, int $port = 0): bool {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_recv($socket, &$buf, int $len, int $flags) {}
+/** @param resource $socket */
+function socket_recv($socket, &$buf, int $len, int $flags): int|false {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_send($socket, string $buf, int $len, int $flags) {}
+/** @param resource $socket */
+function socket_send($socket, string $buf, int $len, int $flags): int|false {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_recvfrom($socket, &$buf, int $len, int $flags, &$name, &$port = UNKNOWN) {}
+/** @param resource $socket */
+function socket_recvfrom($socket, &$buf, int $len, int $flags, &$name, &$port = UNKNOWN): int|false {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, int $port = 0) {}
+/** @param resource $socket */
+function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, int $port = 0): int|false {}
-/**
- * @param resource $socket
- *
- * @return array|int|false
- */
-function socket_get_option($socket, int $level, int $optname) {}
+/** @param resource $socket */
+function socket_get_option($socket, int $level, int $optname): array|int|false {}
/** @param resource $socket */
function socket_set_option($socket, int $level, int $optname, $optval): bool {}
#ifdef HAVE_SOCKETPAIR
-/** @return bool|null */
-function socket_create_pair(int $domain, int $type, int $protocol, &$fd) {}
+function socket_create_pair(int $domain, int $type, int $protocol, &$fd): bool|null {}
#endif
#ifdef HAVE_SHUTDOWN
@@ -112,7 +81,6 @@ function socket_clear_error($socket = UNKNOWN): void {}
/**
* @param resource $stream
- *
* @return resource|false
*/
function socket_import_stream($stream) {}
@@ -120,35 +88,24 @@ function socket_import_stream($stream) {}
/** @param resource $socket */
function socket_export_stream($socket) {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_sendmsg($socket, array $msghdr, int $flags = 0) {}
+/** @param resource $socket */
+function socket_sendmsg($socket, array $msghdr, int $flags = 0): int|false {}
-/**
- * @param resource $socket
- *
- * @return int|false
- */
-function socket_recvmsg($socket, array &$msghdr, int $flags = 0) {}
+/** @param resource $socket */
+function socket_recvmsg($socket, array &$msghdr, int $flags = 0): int|false {}
function socket_cmsg_space(int $level, int $type, int $n = 0): ?int {}
-/** @return array|false */
-function socket_addrinfo_lookup(string $host, string $service = UNKNOWN, array $hints = UNKNOWN) {}
+function socket_addrinfo_lookup(string $host, string $service = UNKNOWN, array $hints = UNKNOWN): array|false {}
/**
* @param resource $addr
- *
* @return resource|false
*/
function socket_addrinfo_connect($addr) {}
/**
* @param resource $addr
- *
* @return resource|false
*/
function socket_addrinfo_bind($addr) {}
@@ -157,16 +114,10 @@ function socket_addrinfo_bind($addr) {}
function socket_addrinfo_explain($addr): array {}
#ifdef PHP_WIN32
-/**
- * @param resource $socket
- *
- * @return string|false
- */
-function socket_wsaprotocol_info_export($socket, int $target_pid) {}
+/** @param resource $socket */
+function socket_wsaprotocol_info_export($socket, int $target_pid): string|false {}
-/**
- * @return resource|false
- */
+/** @return resource|false */
function socket_wsaprotocol_info_import(string $info_id) {}
function socket_wsaprotocol_info_release(string $info_id): bool {}
diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h
index df833f33af..397c2e5683 100644
--- a/ext/sockets/sockets_arginfo.h
+++ b/ext/sockets/sockets_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_select, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(1, read_fds, IS_ARRAY, 1)
ZEND_ARG_TYPE_INFO(1, write_fds, IS_ARRAY, 1)
ZEND_ARG_TYPE_INFO(1, except_fds, IS_ARRAY, 1)
@@ -32,13 +32,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_close, 0, 1, IS_VOID, 0)
ZEND_ARG_INFO(0, socket)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_write, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_write, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_read, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_read, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
@@ -70,21 +70,21 @@ ZEND_END_ARG_INFO()
#define arginfo_socket_bind arginfo_socket_connect
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_recv, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recv, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_INFO(1, buf)
ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_send, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_send, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_recvfrom, 0, 0, 5)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recvfrom, 0, 5, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_INFO(1, buf)
ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0)
@@ -93,7 +93,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_recvfrom, 0, 0, 5)
ZEND_ARG_INFO(1, port)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_sendto, 0, 0, 5)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_sendto, 0, 5, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0)
@@ -102,7 +102,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_sendto, 0, 0, 5)
ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_get_option, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_get_option, 0, 3, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, optname, IS_LONG, 0)
@@ -116,7 +116,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_set_option, 0, 4, _IS_BOO
ZEND_END_ARG_INFO()
#if defined(HAVE_SOCKETPAIR)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_create_pair, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_create_pair, 0, 4, _IS_BOOL, 1)
ZEND_ARG_TYPE_INFO(0, domain, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, protocol, IS_LONG, 0)
@@ -145,13 +145,13 @@ ZEND_END_ARG_INFO()
#define arginfo_socket_export_stream arginfo_socket_accept
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_sendmsg, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_sendmsg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, msghdr, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_recvmsg, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recvmsg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(1, msghdr, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
@@ -163,7 +163,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_cmsg_space, 0, 2, IS_LONG
ZEND_ARG_TYPE_INFO(0, n, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_addrinfo_lookup, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_addrinfo_lookup, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, service, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, hints, IS_ARRAY, 0)
@@ -180,7 +180,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_addrinfo_explain, 0, 1, I
ZEND_END_ARG_INFO()
#if defined(PHP_WIN32)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_wsaprotocol_info_export, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_wsaprotocol_info_export, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, target_pid, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php
index 23d75ba920..1af1e98a7f 100644
--- a/ext/sodium/libsodium.stub.php
+++ b/ext/sodium/libsodium.stub.php
@@ -3,31 +3,27 @@
function sodium_crypto_aead_aes256gcm_is_available(): bool {}
#ifdef HAVE_AESGCM
-/** @return string|false */
-function sodium_crypto_aead_aes256gcm_decrypt(string $string, string $ad, string $nonce, string $key) {}
+function sodium_crypto_aead_aes256gcm_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
function sodium_crypto_aead_aes256gcm_encrypt(string $string, string $ad, string $nonce, string $key): string {}
function sodium_crypto_aead_aes256gcm_keygen(): string {}
#endif
-/** @return string|false */
-function sodium_crypto_aead_chacha20poly1305_decrypt(string $string, string $ad, string $nonce, string $key) {}
+function sodium_crypto_aead_chacha20poly1305_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
function sodium_crypto_aead_chacha20poly1305_encrypt(string $string, string $ad, string $nonce, string $key): string {}
function sodium_crypto_aead_chacha20poly1305_keygen(): string {}
-/** @return string|false */
-function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $string, string $ad, string $nonce, string $key) {}
+function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $string, string $ad, string $nonce, string $key): string {}
function sodium_crypto_aead_chacha20poly1305_ietf_keygen(): string {}
#ifdef crypto_aead_xchacha20poly1305_IETF_NPUBBYTES
-/** @return string|false */
-function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $string, string $ad, string $nonce, string $key) {}
+function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
function sodium_crypto_aead_xchacha20poly1305_ietf_keygen(): string {}
@@ -48,8 +44,7 @@ function sodium_crypto_box_seed_keypair(string $key): string {}
function sodium_crypto_box_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}
-/** @return string|false */
-function sodium_crypto_box_open(string $string, string $nonce, string $key) {}
+function sodium_crypto_box_open(string $string, string $nonce, string $key): string|false {}
function sodium_crypto_box_publickey(string $key): string {}
@@ -57,8 +52,7 @@ function sodium_crypto_box_publickey_from_secretkey(string $key): string {}
function sodium_crypto_box_seal(string $string, string $key): string {}
-/** @return string|false */
-function sodium_crypto_box_seal_open(string $string, string $key) {}
+function sodium_crypto_box_seal_open(string $string, string $key): string|false {}
function sodium_crypto_box_secretkey(string $key): string {}
@@ -114,8 +108,7 @@ function sodium_crypto_secretbox(string $string, string $nonce, string $key): st
function sodium_crypto_secretbox_keygen(): string {}
-/** @return string|false */
-function sodium_crypto_secretbox_open(string $string, string $nonce, string $key) {}
+function sodium_crypto_secretbox_open(string $string, string $nonce, string $key): string|false {}
#ifdef crypto_secretstream_xchacha20poly1305_ABYTES
function sodium_crypto_secretstream_xchacha20poly1305_keygen(): string {}
@@ -126,8 +119,7 @@ function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, strin
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $string, string $key): string {}
-/** @return array|false */
-function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $c, string $ad = "") {}
+function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $c, string $ad = ""): array|false {}
function sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state): void {}
#endif
@@ -148,8 +140,7 @@ function sodium_crypto_sign_keypair(): string {}
function sodium_crypto_sign_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}
-/** @return string|false */
-function sodium_crypto_sign_open(string $string, string $keypair) {}
+function sodium_crypto_sign_open(string $string, string $keypair): string|false {}
function sodium_crypto_sign_publickey(string $key): string {}
diff --git a/ext/sodium/libsodium_arginfo.h b/ext/sodium/libsodium_arginfo.h
index d7c17eee23..90b1d2d5fd 100644
--- a/ext/sodium/libsodium_arginfo.h
+++ b/ext/sodium/libsodium_arginfo.h
@@ -4,7 +4,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_
ZEND_END_ARG_INFO()
#if defined(HAVE_AESGCM)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_decrypt, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_aes256gcm_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
@@ -26,7 +26,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_key
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_aead_chacha20poly1305_decrypt, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_chacha20poly1305_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
@@ -50,7 +50,7 @@ ZEND_END_ARG_INFO()
#define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, 0, 0, 4)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
@@ -102,7 +102,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_keypair_from_s
ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_box_open, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_box_open, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
@@ -114,7 +114,7 @@ ZEND_END_ARG_INFO()
#define arginfo_sodium_crypto_box_seal arginfo_sodium_crypto_auth
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_box_seal_open, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_box_seal_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -271,7 +271,7 @@ ZEND_END_ARG_INFO()
#endif
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, c, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
@@ -303,7 +303,7 @@ ZEND_END_ARG_INFO()
#define arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sodium_crypto_sign_open, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_sign_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, keypair, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index d693b87b90..8c878b74e9 100755
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -110,11 +110,8 @@ function reset(&$arg) {}
*/
function current($arg) {}
-/**
- * @param array|object $arg
- * @return int|string|null
- */
-function key($arg) {}
+/** @param array|object $arg */
+function key($arg): int|string|null {}
/** @return mixed */
function min($arg, ...$args) {}
@@ -130,8 +127,7 @@ function array_walk_recursive(&$input, callable $funcname, $userdata = null): bo
function in_array($needle, array $haystack, bool $strict = false): bool {}
-/** @return int|string|false */
-function array_search($needle, array $haystack, bool $strict = false) {}
+function array_search($needle, array $haystack, bool $strict = false): int|string|false {}
/** @prefer-ref $arg */
function extract(array &$arg, int $extract_type = EXTR_OVERWRITE, string $prefix = ""): int {}
@@ -173,11 +169,9 @@ function array_replace_recursive(array $arr1, array ...$arrays): array {}
function array_keys(array $arg, $search_value = UNKNOWN, bool $strict = false): array {}
-/** @return int|string|null */
-function array_key_first(array $arg) {}
+function array_key_first(array $arg): int|string|null {}
-/** @return int|string|null */
-function array_key_last(array $arg) {}
+function array_key_last(array $arg): int|string|null {}
function array_values(array $arg): array {}
@@ -239,14 +233,11 @@ function array_udiff_uassoc(array $arr1, array $arr2, ...$rest): array {}
*/
function array_multisort(&$arr1, $sort_order = SORT_ASC, $sort_flags = SORT_REGULAR, &...$arr2): bool {}
-/** @return int|string|array */
-function array_rand(array $arg, int $num_req = 1) {}
+function array_rand(array $arg, int $num_req = 1): int|string|array {}
-/** @return int|float */
-function array_sum(array $arg) {}
+function array_sum(array $arg): int|float {}
-/** @return int|float */
-function array_product(array $arg) {}
+function array_product(array $arg): int|float {}
function array_reduce(array $arg, callable $callback, $initial = null) {}
@@ -265,29 +256,24 @@ function array_combine(array $keys, array $values): array {}
function base64_encode(string $str): string {}
-/** @return string|false */
-function base64_decode(string $str, bool $strict = false) {}
+function base64_decode(string $str, bool $strict = false): string|false {}
/* basic_functions.c */
/** @return mixed */
function constant(string $name) {}
-/** @return int|false */
-function ip2long(string $ip_address) {}
+function ip2long(string $ip_address): int|false {}
-/** @return string|false */
-function long2ip(int $proper_address) {}
+function long2ip(int $proper_address): string|false {}
-/** @return string|array|false */
-function getenv(string $variable = UNKNOWN, bool $local_only = false) {}
+function getenv(string $variable = UNKNOWN, bool $local_only = false): string|array|false {}
#ifdef HAVE_PUTENV
function putenv(string $setting): bool {}
#endif
-/** @return array|false */
-function getopt(string $options, array $longopts = [], &$optind = null) {}
+function getopt(string $options, array $longopts = [], &$optind = null): array|false {}
function flush(): void {}
@@ -296,16 +282,14 @@ function sleep(int $seconds): int {}
function usleep(int $microseconds): void {}
#if HAVE_NANOSLEEP
-/** @return array|bool */
-function nanosleep(int $seconds, int $nanoseconds) {}
+function nanosleep(int $seconds, int $nanoseconds): array|bool {}
function time_sleep_until(float $timestamp): bool {}
#endif
function get_current_user(): string {}
-/** @return string|array|false */
-function get_cfg_var(string $option_name) {}
+function get_cfg_var(string $option_name): string|array|false {}
function get_magic_quotes_runtime(): bool {}
@@ -338,42 +322,31 @@ function forward_static_call_array(callable $function, array $args) {}
/**
* @param callable $function
* @param mixed ...$args
- * @return false|null
*/
-function register_shutdown_function($function, ...$args) {}
+function register_shutdown_function($function, ...$args): ?bool {}
-/** @return string|bool|null */
-function highlight_file(string $filename, bool $return = false) {}
+function highlight_file(string $filename, bool $return = false): string|bool|null {}
function php_strip_whitespace(string $filename): string {}
-/** @return string|bool|null */
-function highlight_string(string $string, bool $return = false) {}
+function highlight_string(string $string, bool $return = false): string|bool|null {}
-/** @return string|false */
-function ini_get(string $varname) {}
+function ini_get(string $varname): string|false {}
-/** @return array|false */
-function ini_get_all(?string $extension = null, bool $details = true) {}
+function ini_get_all(?string $extension = null, bool $details = true): array|false {}
-/** @return string|false */
-function ini_set(string $varname, string $value) {}
+function ini_set(string $varname, string $value): string|false {}
function ini_restore(string $varname): void {}
-/** @return string|false */
-function set_include_path(string $include_path) {}
+function set_include_path(string $include_path): string|false {}
-/** @return string|false */
-function get_include_path() {}
+function get_include_path(): string|false {}
function restore_include_path(): void {}
-/**
- * @param mixed $var
- * @return string|bool
- */
-function print_r($var, bool $return = false) {}
+/** @param mixed $var */
+function print_r($var, bool $return = false): string|bool {}
function connection_aborted(): int {}
@@ -382,23 +355,19 @@ function connection_status(): int {}
function ignore_user_abort(bool $value = UNKNOWN): int {}
#if HAVE_GETSERVBYNAME
-/** @return int|false */
-function getservbyname(string $service, string $protocol) {}
+function getservbyname(string $service, string $protocol): int|false {}
#endif
#if HAVE_GETSERVBYPORT
-/** @return string|false */
-function getservbyport(int $port, string $protocol) {}
+function getservbyport(int $port, string $protocol): string|false {}
#endif
#if HAVE_GETPROTOBYNAME
-/** @return int|false */
-function getprotobyname(string $name) {}
+function getprotobyname(string $name): int|false {}
#endif
#if HAVE_GETPROTOBYNUMBER
-/** @return string|false */
-function getprotobynumber(int $protocol) {}
+function getprotobynumber(int $protocol): string|false {}
#endif
/** @param mixed $args */
@@ -410,25 +379,21 @@ function is_uploaded_file(string $path): bool {}
function move_uploaded_file(string $path, string $new_path): bool {}
-/** @return array|false */
-function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL) {}
+function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {}
-/** @return array|false */
-function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL) {}
+function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {}
#if ZEND_DEBUG
function config_get_hash(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array {}
#endif
#ifdef HAVE_GETLOADAVG
-/** @return array|false */
-function sys_getloadavg() {}
+function sys_getloadavg(): array|false {}
#endif
/* browscap.c */
-/** @return object|array|false */
-function get_browser(?string $browser_name = null, bool $return_array = false) {}
+function get_browser(?string $browser_name = null, bool $return_array = false): object|array|false {}
/* crc32.c */
@@ -445,38 +410,32 @@ function convert_cyr_string(string $str, string $from, string $to): string {}
/* datetime.c */
#if HAVE_STRPTIME
-/** @return array|false */
-function strptime(string $timestamp, string $format) {}
+function strptime(string $timestamp, string $format): array|false {}
#endif
/* dns.c */
#ifdef HAVE_GETHOSTNAME
-/** @return string|false */
-function gethostname() {}
+function gethostname(): string|false {}
#endif
-/** @return string|false */
-function gethostbyaddr(string $ip_address) {}
+function gethostbyaddr(string $ip_address): string|false {}
function gethostbyname(string $hostname): string {}
-/** @return array|false */
-function gethostbynamel(string $hostname) {}
+function gethostbynamel(string $hostname): array|false {}
#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC
function dns_check_record(string $hostname, string $type = "MX"): bool {}
-/** @return array|false */
-function dns_get_record(string $hostname, int $type = DNS_ANY, &$authns = null, &$addtl = null, bool $raw = false) {}
+function dns_get_record(string $hostname, int $type = DNS_ANY, &$authns = null, &$addtl = null, bool $raw = false): array|false {}
function dns_get_mx(string $hostname, &$mxhosts, &$weight = null): bool {}
#endif
/* net.c */
-/** @return array|false */
-function net_get_interfaces() {}
+function net_get_interfaces(): array|false {}
/* ftok.c */
@@ -486,8 +445,7 @@ function ftok(string $pathname, string $proj): int {}
/* hrtime.c */
-/** @return array|int|float|false */
-function hrtime(bool $get_as_number = false) {}
+function hrtime(bool $get_as_number = false): array|int|float|false {}
/* lcg.c */
@@ -497,22 +455,17 @@ function lcg_value(): float {}
function md5(string $str, bool $raw_output = false): string {}
-/** @return string|false */
-function md5_file(string $filename, bool $raw_output = false) {}
+function md5_file(string $filename, bool $raw_output = false): string|false {}
/* pageinfo.c */
-/** @return int|false */
-function getmyuid() {}
+function getmyuid(): int|false {}
-/** @return int|false */
-function getmygid() {}
+function getmygid(): int|false {}
-/** @return int|false */
-function getmypid() {}
+function getmypid(): int|false {}
-/** @return int|false */
-function getmyinode() {}
+function getmyinode(): int|false {}
function getlastmod(): int {}
@@ -520,33 +473,29 @@ function getlastmod(): int {}
function sha1(string $str, bool $raw_output = false): string {}
-/** @return string|false */
-function sha1_file(string $filename, bool $raw_output = false) {}
+function sha1_file(string $filename, bool $raw_output = false): string|false {}
/* syslog.c */
#ifdef HAVE_SYSLOG_H
-function openlog (string $ident, int $option, int $facility): bool {}
+function openlog(string $ident, int $option, int $facility): bool {}
-function closelog (): bool {}
+function closelog(): bool {}
-function syslog (int $priority, string $message): bool {}
+function syslog(int $priority, string $message): bool {}
#endif
#ifdef HAVE_INET_NTOP
-/** @return string|false */
-function inet_ntop (string $in_addr) {}
+function inet_ntop(string $in_addr): string|false {}
#endif
#ifdef HAVE_INET_PTON
-/** @return string|false */
-function inet_pton (string $ip_address) {}
+function inet_pton(string $ip_address): string|false {}
#endif
/* metaphone.c */
-/** @return string|false */
-function metaphone(string $text, int $phones = 0) {}
+function metaphone(string $text, int $phones = 0): string|false {}
/* {{{ head.c */
function header(string $string, bool $replace = true, int $http_response_code = 0): void { }
@@ -556,12 +505,10 @@ function header_remove(string $name = UNKNOWN): void { }
/** @param int|array $expires_or_options */
function setrawcookie(string $name, string $value = '', $expires_or_options = 0, string $path = '', string $domain = '', bool $secure = false, bool $httponly = false): bool {}
-
/** @param int|array $expires_or_options */
function setcookie(string $name, string $value = '', $expires_or_options = 0, string $path = '', string $domain = '', bool $secure = false, bool $httponly = false): bool {}
-/** @return int|bool */
-function http_response_code(int $response_code = 0) {}
+function http_response_code(int $response_code = 0): int|bool {}
function headers_sent(&$file = null, &$line = null): bool {}
@@ -571,11 +518,9 @@ function headers_list(): array { }
function htmlspecialchars(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {}
-/** @return string|false */
-function htmlspecialchars_decode(string $string, int $quote_style = ENT_COMPAT) {}
+function htmlspecialchars_decode(string $string, int $quote_style = ENT_COMPAT): string|false {}
-/** @return string|false */
-function html_entity_decode(string $string, int $quote_style = ENT_COMPAT, string $encoding = UNKNOWN) {}
+function html_entity_decode(string $string, int $quote_style = ENT_COMPAT, string $encoding = UNKNOWN): string|false {}
function htmlentities(string $string, int $quote_style = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {}
@@ -588,25 +533,20 @@ function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $quote_s
/** @param mixed $assertion */
function assert($assertion, $description = null): bool {}
-/** @return int|string|bool|null */
-function assert_options(int $what, $value = UNKNOWN) {}
+function assert_options(int $what, $value = UNKNOWN): array|int|string|bool|null {}
/* string.c */
function bin2hex(string $data): string {}
-/** @return string|false */
-function hex2bin(string $data) {}
+function hex2bin(string $data): string|false {}
-/** @return int|false */
-function strspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN) {}
+function strspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN): int|false {}
-/** @return int|false */
-function strcspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN) {}
+function strcspn(string $str, string $mask, int $start = 0, int $len = UNKNOWN): int|false {}
#if HAVE_NL_LANGINFO
-/** @return string|false */
-function nl_langinfo(int $item) {}
+function nl_langinfo(int $item): string|false {}
#endif
function strcoll(string $str1, string $str2): int {}
@@ -630,9 +570,8 @@ function implode($glue, $pieces = UNKNOWN): string {}
/**
* @param string $str Optional - defaults to previous string
* @param string $token
- * @return string|false
*/
-function strtok(string $str, string $token = UNKNOWN) {}
+function strtok(string $str, string $token = UNKNOWN): string|false {}
function strtoupper(string $str): string {}
@@ -642,8 +581,7 @@ function basename(string $path, string $suffix = ""): string {}
function dirname(string $path, int $levels = 1): string {}
-/** @return array|string */
-function pathinfo(string $path, int $options = UNKNOWN) {}
+function pathinfo(string $path, int $options = UNKNOWN): array|string {}
function stristr(string $haystack, string $needle, bool $before_needle = false): string|false {}
@@ -661,17 +599,15 @@ function strrchr(string $haystack, string $needle): string|false {}
function chunk_split(string $str, int $chunklen = 76, string $ending = "\r\n"): string {}
-/** @return string|false */
-function substr(string $str, int $start, ?int $length = null) {}
+function substr(string $str, int $start, ?int $length = null): string|false {}
/**
* @param mixed $str
* @param mixed $replace
* @param mixed $start
* @param mixed $length
- * @return string|array|false
*/
-function substr_replace($str, $replace, $start, $length = UNKNOWN) {}
+function substr_replace($str, $replace, $start, $length = UNKNOWN): string|array|false {}
function quotemeta(string $str): string {}
@@ -708,18 +644,16 @@ function stripslashes(string $str): string {}
* @param string|array $replace
* @param string|array $subject
* @param int $replace_count
- * @return string|array
*/
-function str_replace($search, $replace, $subject, &$replace_count = UNKNOWN) {}
+function str_replace($search, $replace, $subject, &$replace_count = UNKNOWN): string|array {}
/**
* @param string|array $search
* @param string|array $replace
* @param string|array $subject
* @param int $replace_count
- * @return string|array
*/
-function str_ireplace($search, $replace, $subject, &$replace_count = UNKNOWN) {}
+function str_ireplace($search, $replace, $subject, &$replace_count = UNKNOWN): string|array {}
function hebrev(string $str, int $max_chars_per_line = 0): string {}
@@ -732,9 +666,8 @@ function strip_tags(string $str, $allowable_tags = UNKNOWN): string {}
/**
* @param string|array $locales
- * @return string|false
*/
-function setlocale(int $category, $locales, ...$rest) {}
+function setlocale(int $category, $locales, ...$rest): string|false {}
/** @param array $result */
function parse_str(string $encoded_string, &$result): void {}
@@ -743,8 +676,7 @@ function str_getcsv(string $string, string $delimiter = ',', string $enclosure =
function str_repeat(string $input, int $mult): string {}
-/** @return array|string */
-function count_chars(string $input, int $mode = 0) {}
+function count_chars(string $input, int $mode = 0): array|string {}
function strnatcmp(string $s1, string $s2): int {}
@@ -752,33 +684,27 @@ function localeconv(): array {}
function strnatcasecmp(string $s1, string $s2): int {}
-/** @return int|false */
-function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length = null) {}
+function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length = null): int|false {}
function str_pad(string $input, int $pad_length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string {}
-/** @return array|int|null */
-function sscanf(string $str, string $format, &...$vars) {}
+function sscanf(string $str, string $format, &...$vars): array|int|null {}
function str_rot13(string $str): string {}
function str_shuffle(string $str): string {}
-/** @return array|int */
-function str_word_count(string $str, int $format = 0, string $charlist = UNKNOWN) {}
+function str_word_count(string $str, int $format = 0, string $charlist = UNKNOWN): array|int {}
#ifdef HAVE_STRFMON
-/** @return string|false */
-function money_format(string $format, float $value) {}
+function money_format(string $format, float $value): string|false {}
#endif
function str_split(string $str, int $split_length = 1): array {}
-/** @return string|false */
-function strpbrk(string $haystack, string $char_list) {}
+function strpbrk(string $haystack, string $char_list): string|false {}
-/** @return int|false */
-function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false) {}
+function substr_compare(string $main_str, string $str, int $offset, ?int $length = null, bool $case_insensitivity = false): int|false {}
function utf8_encode(string $data): string {}
@@ -828,54 +754,39 @@ function chdir(string $directory): bool {}
function chroot(string $directory): bool {}
#endif
-/** @return string|false */
-function getcwd() {}
+function getcwd(): string|false {}
/** @param resource $dir_handle */
function rewinddir($dir_handle = UNKNOWN): void {}
-/** @return string|false */
-function readdir($dir_handle = UNKNOWN) {}
+function readdir($dir_handle = UNKNOWN): string|false {}
-/**
- * @param resource $context
- * @return array|false
- */
-function scandir(string $directory, int $sorting_order = 0, $context = UNKNOWN) {}
+/** @param resource $context */
+function scandir(string $directory, int $sorting_order = 0, $context = UNKNOWN): array|false {}
#ifdef HAVE_GLOB
-/** @return array|false */
-function glob(string $pattern, int $flags = 0) {}
+function glob(string $pattern, int $flags = 0): array|false {}
#endif
/* filestat.c */
-/** @return int|false */
-function fileatime(string $filename) {}
+function fileatime(string $filename): int|false {}
-/** @return int|false */
-function filectime(string $filename) {}
+function filectime(string $filename): int|false {}
-/** @return int|false */
-function filegroup(string $filename) {}
+function filegroup(string $filename): int|false {}
-/** @return int|false */
-function fileinode(string $filename) {}
+function fileinode(string $filename): int|false {}
-/** @return int|false */
-function filemtime(string $filename) {}
+function filemtime(string $filename): int|false {}
-/** @return int|false */
-function fileowner(string $filename) {}
+function fileowner(string $filename): int|false {}
-/** @return int|false */
-function fileperms(string $filename) {}
+function fileperms(string $filename): int|false {}
-/** @return int|false */
-function filesize(string $filename) {}
+function filesize(string $filename): int|false {}
-/** @return string|false */
-function filetype(string $filename) {}
+function filetype(string $filename): string|false {}
function file_exists(string $filename): bool {}
@@ -893,11 +804,9 @@ function is_dir(string $filename): bool {}
function is_link(string $filename): bool {}
-/** @return array|false */
-function stat(string $filename) {}
+function stat(string $filename): array|false {}
-/** @return array|false */
-function lstat(string $filename) {}
+function lstat(string $filename): array|false {}
function chown(string $filename, $user): bool {}
@@ -917,14 +826,11 @@ function touch(string $filename, int $time = 0, int $atime = 0): bool {}
function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {}
-/** @return float|false */
-function disk_total_space(string $directory) {}
+function disk_total_space(string $directory): float|false {}
-/** @return float|false */
-function disk_free_space(string $directory) {}
+function disk_free_space(string $directory): float|false {}
-/** @return float|false */
-function diskfreespace(string $directory) {}
+function diskfreespace(string $directory): float|false {}
function realpath_cache_get(): array {}
@@ -934,29 +840,23 @@ function realpath_cache_size(): int {}
function phpinfo(int $what = INFO_ALL): bool {}
-/** @return string|false */
-function phpversion(string $extension = UNKNOWN) {}
+function phpversion(string $extension = UNKNOWN): string|false {}
function phpcredits(int $flag = CREDITS_ALL): bool {}
-/** @return string|false */
-function php_sapi_name() {}
+function php_sapi_name(): string|false {}
function php_uname(string $mode = "a"): string {}
-/** @return string|false */
-function php_ini_scanned_files() {}
+function php_ini_scanned_files(): string|false {}
-/** @return string|false */
-function php_ini_loaded_file() {}
+function php_ini_loaded_file(): string|false {}
/* iptc.c */
-/** @return string|bool */
-function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0) {}
+function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0): string|bool {}
-/** @return array|false */
-function iptcparse(string $iptcblock) {}
+function iptcparse(string $iptcblock): array|false {}
/* levenshtein.c */
@@ -965,11 +865,9 @@ function levenshtein(string $str1, string $str2, $cost_ins = UNKNOWN, int $cost_
/* link.c */
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
-/** @return string|false */
-function readlink(string $path) {}
+function readlink(string $path): string|false {}
-/** @return int|false */
-function linkinfo(string $path) {}
+function linkinfo(string $path): int|false {}
function symlink(string $target, string $link): bool {}
@@ -985,11 +883,8 @@ function mail(string $to, string $subject, string $message, $additional_headers
/* math.c */
-/**
- * @param int|float $number
- * @return int|float
- */
-function abs($number) {}
+/** @param int|float $number */
+function abs($number): int|float {}
function ceil(float $number): float {}
@@ -1042,8 +937,7 @@ function pow($base, $exp) {}
function exp(float $number): float {}
-/** @return float|false */
-function log(float $number, float $base = M_E) {}
+function log(float $number, float $base = M_E): float|false {}
function log10(float $number): float {}
@@ -1055,14 +949,11 @@ function deg2rad(float $number): float {}
function rad2deg(float $number): float {}
-/** @return int|float */
-function bindec(string $binary_string) {}
+function bindec(string $binary_string): int|float {}
-/** @return int|float */
-function hexdec(string $hex_string) {}
+function hexdec(string $hex_string): int|float {}
-/** @return int|float */
-function octdec(string $octal_string) {}
+function octdec(string $octal_string): int|float {}
function decbin($number): string {}
@@ -1081,32 +972,26 @@ function fdiv(float $dividend, float $divisor): float {}
/* microtime.c */
#ifdef HAVE_GETTIMEOFDAY
-/** @return string|float */
-function microtime(bool $get_as_float = false) {}
+function microtime(bool $get_as_float = false): string|float {}
-/** @return array|float */
-function gettimeofday(bool $return_float = false) {}
+function gettimeofday(bool $return_float = false): array|float {}
#endif
#ifdef HAVE_GETRUSAGE
-/** @return array|false */
-function getrusage(int $who = 0) {}
+function getrusage(int $who = 0): array|false {}
#endif
/* pack.c */
-/** @return string|false */
-function pack(string $format, ...$args) {}
+function pack(string $format, ...$args): string|false {}
-/** @return array|false */
-function unpack(string $format, string $data, int $offset = 0) {}
+function unpack(string $format, string $data, int $offset = 0): array|false {}
/* password.c */
function password_get_info(string $hash): ?array {}
-/** @return string|false */
-function password_hash(string $password, $algo, array $options = []) {}
+function password_hash(string $password, $algo, array $options = []): string|false|null {}
function password_needs_rehash(string $hash, $algo, array $options = []): bool {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 2a54583871..431830d632 100755
--- a/ext/standard/basic_functions_arginfo.h
+++ b/ext/standard/basic_functions_arginfo.h
@@ -122,7 +122,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_current, 0, 0, 1)
ZEND_ARG_INFO(0, arg)
ZEND_END_ARG_INFO()
-#define arginfo_key arginfo_current
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_key, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL)
+ ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1)
ZEND_ARG_INFO(0, arg)
@@ -145,7 +147,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_in_array, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_array_search, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_search, 0, 2, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, needle)
ZEND_ARG_TYPE_INFO(0, haystack, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0)
@@ -225,7 +227,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_keys, 0, 1, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_array_key_first, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_key_first, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
@@ -313,14 +315,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_multisort, 0, 1, _IS_BOOL,
ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, arr2)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_rand, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, num_req, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_array_sum arginfo_array_key_first
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_sum, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE)
+ ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_array_product arginfo_array_key_first
+#define arginfo_array_product arginfo_array_sum
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_reduce, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0)
@@ -360,7 +364,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_base64_encode, 0, 1, IS_STRING,
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_base64_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_base64_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -369,15 +373,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_constant, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ip2long, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ip2long, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_long2ip, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_long2ip, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, proper_address, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getenv, 0, 0, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, variable, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, local_only, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -388,7 +392,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_putenv, 0, 1, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getopt, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getopt, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, longopts, IS_ARRAY, 0)
ZEND_ARG_INFO(1, optind)
@@ -406,7 +410,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_usleep, 0, 1, IS_VOID, 0)
ZEND_END_ARG_INFO()
#if HAVE_NANOSLEEP
-ZEND_BEGIN_ARG_INFO_EX(arginfo_nanosleep, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_nanosleep, 0, 2, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, nanoseconds, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -421,7 +425,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_current_user, 0, 0, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_cfg_var, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_cfg_var, 0, 1, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, option_name, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -455,12 +459,12 @@ ZEND_END_ARG_INFO()
#define arginfo_forward_static_call_array arginfo_call_user_func_array
-ZEND_BEGIN_ARG_INFO_EX(arginfo_register_shutdown_function, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_register_shutdown_function, 0, 1, _IS_BOOL, 1)
ZEND_ARG_INFO(0, function)
ZEND_ARG_VARIADIC_INFO(0, args)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_file, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_file, 0, 1, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -469,21 +473,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_php_strip_whitespace, 0, 1, IS_S
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_highlight_string, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_highlight_string, 0, 1, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_get, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_get_all, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_get_all, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, extension, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, details, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ini_set, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ini_set, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -492,16 +496,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ini_restore, 0, 1, IS_VOID, 0)
ZEND_ARG_TYPE_INFO(0, varname, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_set_include_path, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_set_include_path, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, include_path, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_include_path, 0, 0, 0)
-ZEND_END_ARG_INFO()
+#define arginfo_get_include_path arginfo_ob_get_flush
#define arginfo_restore_include_path arginfo_flush
-ZEND_BEGIN_ARG_INFO_EX(arginfo_print_r, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_print_r, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_INFO(0, var)
ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -515,27 +518,27 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ignore_user_abort, 0, 0, IS_LONG
ZEND_END_ARG_INFO()
#if HAVE_GETSERVBYNAME
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getservbyname, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getservbyname, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, service, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, protocol, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if HAVE_GETSERVBYPORT
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getservbyport, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getservbyport, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, protocol, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if HAVE_GETPROTOBYNAME
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getprotobyname, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getprotobyname, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if HAVE_GETPROTOBYNUMBER
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getprotobynumber, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getprotobynumber, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, protocol, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
@@ -558,13 +561,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_move_uploaded_file, 0, 2, _IS_BO
ZEND_ARG_TYPE_INFO(0, new_path, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_parse_ini_file, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, process_sections, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, scanner_mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_string, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_parse_ini_string, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, ini_string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, process_sections, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, scanner_mode, IS_LONG, 0)
@@ -579,11 +582,11 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETLOADAVG)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sys_getloadavg, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sys_getloadavg, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_browser, 0, 0, MAY_BE_OBJECT|MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, browser_name, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, return_array, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -604,24 +607,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_convert_cyr_string, 0, 3, IS_STR
ZEND_END_ARG_INFO()
#if HAVE_STRPTIME
-ZEND_BEGIN_ARG_INFO_EX(arginfo_strptime, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strptime, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, timestamp, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETHOSTNAME)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gethostname, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gethostname, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
#endif
-#define arginfo_gethostbyaddr arginfo_ip2long
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gethostbyaddr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gethostbyname, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gethostbynamel, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gethostbynamel, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -633,7 +638,7 @@ ZEND_END_ARG_INFO()
#endif
#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dns_get_record, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_ARG_INFO(1, authns)
@@ -650,7 +655,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dns_get_mx, 0, 2, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#endif
-#define arginfo_net_get_interfaces arginfo_get_include_path
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_net_get_interfaces, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
#if HAVE_FTOK
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftok, 0, 2, IS_LONG, 0)
@@ -659,7 +665,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ftok, 0, 2, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_hrtime, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hrtime, 0, 0, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, get_as_number, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -671,18 +677,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_md5, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_md5_file, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_md5_file, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, raw_output, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-#define arginfo_getmyuid arginfo_get_include_path
+#define arginfo_getmyuid arginfo_ob_get_length
-#define arginfo_getmygid arginfo_get_include_path
+#define arginfo_getmygid arginfo_ob_get_length
-#define arginfo_getmypid arginfo_get_include_path
+#define arginfo_getmypid arginfo_ob_get_length
-#define arginfo_getmyinode arginfo_get_include_path
+#define arginfo_getmyinode arginfo_ob_get_length
#define arginfo_getlastmod arginfo_ob_get_level
@@ -711,18 +717,18 @@ ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_INET_NTOP)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_inet_ntop, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inet_ntop, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, in_addr, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_INET_PTON)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_inet_pton, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inet_pton, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_metaphone, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_metaphone, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, phones, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -749,7 +755,7 @@ ZEND_END_ARG_INFO()
#define arginfo_setcookie arginfo_setrawcookie
-ZEND_BEGIN_ARG_INFO_EX(arginfo_http_response_code, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_http_response_code, 0, 0, MAY_BE_LONG|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, response_code, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -767,12 +773,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_htmlspecialchars, 0, 1, IS_STRIN
ZEND_ARG_TYPE_INFO(0, double_encode, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_htmlspecialchars_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_html_entity_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_html_entity_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, quote_style, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
@@ -791,7 +797,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_assert, 0, 1, _IS_BOOL, 0)
ZEND_ARG_INFO(0, description)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_assert_options, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_assert_options, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
@@ -800,11 +806,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bin2hex, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_hex2bin, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hex2bin, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_strspn, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strspn, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mask, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
@@ -814,7 +820,7 @@ ZEND_END_ARG_INFO()
#define arginfo_strcspn arginfo_strspn
#if HAVE_NL_LANGINFO
-ZEND_BEGIN_ARG_INFO_EX(arginfo_nl_langinfo, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_nl_langinfo, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, item, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
@@ -851,7 +857,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_implode, 0, 1, IS_STRING, 0)
ZEND_ARG_INFO(0, pieces)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_strtok, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtok, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, token, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -870,7 +876,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dirname, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, levels, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pathinfo, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pathinfo, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -906,13 +912,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chunk_split, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, ending, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_substr, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_replace, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, replace)
ZEND_ARG_INFO(0, start)
@@ -963,7 +969,7 @@ ZEND_END_ARG_INFO()
#define arginfo_stripslashes arginfo_base64_encode
-ZEND_BEGIN_ARG_INFO_EX(arginfo_str_replace, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_str_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_INFO(0, search)
ZEND_ARG_INFO(0, replace)
ZEND_ARG_INFO(0, subject)
@@ -989,7 +995,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_strip_tags, 0, 1, IS_STRING, 0)
ZEND_ARG_INFO(0, allowable_tags)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_setlocale, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_setlocale, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, category, IS_LONG, 0)
ZEND_ARG_INFO(0, locales)
ZEND_ARG_VARIADIC_INFO(0, rest)
@@ -1012,7 +1018,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_repeat, 0, 2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mult, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_count_chars, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_count_chars, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -1026,7 +1032,7 @@ ZEND_END_ARG_INFO()
#define arginfo_strnatcasecmp arginfo_strnatcmp
-ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_count, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_count, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
@@ -1040,7 +1046,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_pad, 0, 2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, pad_type, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sscanf, 0, 2, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_ARG_VARIADIC_INFO(1, vars)
@@ -1050,14 +1056,14 @@ ZEND_END_ARG_INFO()
#define arginfo_str_shuffle arginfo_base64_encode
-ZEND_BEGIN_ARG_INFO_EX(arginfo_str_word_count, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_str_word_count, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, charlist, IS_STRING, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_STRFMON)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_money_format, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_money_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_DOUBLE, 0)
ZEND_END_ARG_INFO()
@@ -1068,12 +1074,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_split, 0, 1, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, split_length, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, char_list, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_substr_compare, 0, 0, 3)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_compare, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, main_str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
@@ -1114,26 +1120,28 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chroot, 0, 1, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#endif
-#define arginfo_getcwd arginfo_get_include_path
+#define arginfo_getcwd arginfo_ob_get_flush
#define arginfo_rewinddir arginfo_closedir
-#define arginfo_readdir arginfo_class_Directory_close
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readdir, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, dir_handle)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_scandir, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_scandir, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, sorting_order, IS_LONG, 0)
ZEND_ARG_INFO(0, context)
ZEND_END_ARG_INFO()
#if defined(HAVE_GLOB)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_glob, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_glob, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_fileatime, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fileatime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -1151,7 +1159,9 @@ ZEND_END_ARG_INFO()
#define arginfo_filesize arginfo_fileatime
-#define arginfo_filetype arginfo_fileatime
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_filetype, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_file_exists, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -1171,9 +1181,11 @@ ZEND_END_ARG_INFO()
#define arginfo_is_link arginfo_file_exists
-#define arginfo_stat arginfo_fileatime
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stat, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
-#define arginfo_lstat arginfo_fileatime
+#define arginfo_lstat arginfo_stat
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chown, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -1217,7 +1229,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_clearstatcache, 0, 0, IS_VOID, 0
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_disk_total_space, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_disk_total_space, 0, 1, MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -1233,7 +1245,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpinfo, 0, 0, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, what, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_phpversion, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phpversion, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, extension, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -1241,23 +1253,23 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpcredits, 0, 0, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, flag, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_php_sapi_name arginfo_get_include_path
+#define arginfo_php_sapi_name arginfo_ob_get_flush
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_php_uname, 0, 0, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#define arginfo_php_ini_scanned_files arginfo_get_include_path
+#define arginfo_php_ini_scanned_files arginfo_ob_get_flush
-#define arginfo_php_ini_loaded_file arginfo_get_include_path
+#define arginfo_php_ini_loaded_file arginfo_ob_get_flush
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iptcembed, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iptcembed, 0, 2, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, iptcdata, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, jpeg_file_name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, spool, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_iptcparse, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iptcparse, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, iptcblock, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -1270,13 +1282,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_levenshtein, 0, 2, IS_LONG, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_readlink, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readlink, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
-#define arginfo_linkinfo arginfo_readlink
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_linkinfo, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
+ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
@@ -1300,7 +1314,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mail, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, additional_parameters, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_abs, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_abs, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_ARG_INFO(0, number)
ZEND_END_ARG_INFO()
@@ -1371,7 +1385,7 @@ ZEND_END_ARG_INFO()
#define arginfo_exp arginfo_ceil
-ZEND_BEGIN_ARG_INFO_EX(arginfo_log, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_log, 0, 1, MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, number, IS_DOUBLE, 0)
ZEND_ARG_TYPE_INFO(0, base, IS_DOUBLE, 0)
ZEND_END_ARG_INFO()
@@ -1389,15 +1403,15 @@ ZEND_END_ARG_INFO()
#define arginfo_rad2deg arginfo_ceil
-ZEND_BEGIN_ARG_INFO_EX(arginfo_bindec, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bindec, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_ARG_TYPE_INFO(0, binary_string, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_hexdec, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hexdec, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_ARG_TYPE_INFO(0, hex_string, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_octdec, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_octdec, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_ARG_TYPE_INFO(0, octal_string, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -1430,29 +1444,29 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fdiv, 0, 2, IS_DOUBLE, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_GETTIMEOFDAY)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_microtime, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_microtime, 0, 0, MAY_BE_STRING|MAY_BE_DOUBLE)
ZEND_ARG_TYPE_INFO(0, get_as_float, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETTIMEOFDAY)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gettimeofday, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gettimeofday, 0, 0, MAY_BE_ARRAY|MAY_BE_DOUBLE)
ZEND_ARG_TYPE_INFO(0, return_float, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_GETRUSAGE)
-ZEND_BEGIN_ARG_INFO_EX(arginfo_getrusage, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_getrusage, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, who, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
-ZEND_BEGIN_ARG_INFO_EX(arginfo_pack, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pack, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_ARG_VARIADIC_INFO(0, args)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_unpack, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unpack, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
@@ -1462,7 +1476,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_get_info, 0, 1, IS_ARRA
ZEND_ARG_TYPE_INFO(0, hash, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_password_hash, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_password_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
ZEND_ARG_INFO(0, algo)
ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0)
diff --git a/ext/sysvmsg/sysvmsg.stub.php b/ext/sysvmsg/sysvmsg.stub.php
index a85090d96d..27b59d950a 100644
--- a/ext/sysvmsg/sysvmsg.stub.php
+++ b/ext/sysvmsg/sysvmsg.stub.php
@@ -18,11 +18,8 @@ function msg_receive($queue, int $desiredmsgtype, &$msgtype, int $maxsize, &$mes
*/
function msg_remove_queue($queue): bool {}
-/**
- * @param resource $queue
- * @return array|false
- */
-function msg_stat_queue($queue) {}
+/** @param resource $queue */
+function msg_stat_queue($queue): array|false {}
/**
* @param resource $queue
diff --git a/ext/sysvmsg/sysvmsg_arginfo.h b/ext/sysvmsg/sysvmsg_arginfo.h
index 05616cfc5a..87a4e17358 100644
--- a/ext/sysvmsg/sysvmsg_arginfo.h
+++ b/ext/sysvmsg/sysvmsg_arginfo.h
@@ -29,7 +29,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msg_remove_queue, 0, 1, _IS_BOOL
ZEND_ARG_INFO(0, queue)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_stat_queue, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msg_stat_queue, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, queue)
ZEND_END_ARG_INFO()
diff --git a/ext/tidy/tidy.stub.php b/ext/tidy/tidy.stub.php
index b2d36f96c4..34cbe6fe08 100644
--- a/ext/tidy/tidy.stub.php
+++ b/ext/tidy/tidy.stub.php
@@ -6,8 +6,7 @@
*/
function tidy_parse_string(string $input, $config_options = UNKNOWN, string $encoding = UNKNOWN) {}
-/** @return string|false */
-function tidy_get_error_buffer(tidy $object) {}
+function tidy_get_error_buffer(tidy $object): string|false {}
function tidy_get_output(tidy $object): string {}
@@ -19,25 +18,18 @@ function tidy_parse_file(string $file, $config_options = UNKNOWN, string $encodi
function tidy_clean_repair(tidy $object): bool {}
-/**
- * @param array|string $config_options
- * @return string|false
- */
-function tidy_repair_string(string $data, $config_file = UNKNOWN, string $encoding = UNKNOWN) {}
+/** @param array|string $config_options */
+function tidy_repair_string(string $data, $config_file = UNKNOWN, string $encoding = UNKNOWN): string|false {}
-/**
- * @param array|string $config_options
- * @return string|false
- */
-function tidy_repair_file(string $filename, $config_file = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false) {}
+/** @param array|string $config_options */
+function tidy_repair_file(string $filename, $config_file = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): string|false {}
function tidy_diagnose(tidy $object): bool {}
function tidy_get_release(): string {}
#if HAVE_TIDYOPTGETDOC
-/** @return string|false */
-function tidy_get_opt_doc(tidy $object, string $optname) {}
+function tidy_get_opt_doc(tidy $object, string $optname): string|false {}
#endif
function tidy_get_config(tidy $object): array {}
@@ -58,8 +50,7 @@ function tidy_access_count(tidy $object): int {}
function tidy_config_count(tidy $object): int {}
-/** @return string|int|bool */
-function tidy_getopt(tidy $object, string $option) {}
+function tidy_getopt(tidy $object, string $option): string|int|bool {}
function tidy_get_root(tidy $object): ?tidyNode {}
diff --git a/ext/tidy/tidy_arginfo.h b/ext/tidy/tidy_arginfo.h
index 2b0335e970..ab74b91194 100644
--- a/ext/tidy/tidy_arginfo.h
+++ b/ext/tidy/tidy_arginfo.h
@@ -6,7 +6,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_tidy_parse_string, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_tidy_get_error_buffer, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_get_error_buffer, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, object, tidy, 0)
ZEND_END_ARG_INFO()
@@ -25,13 +25,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_tidy_clean_repair, 0, 1, _IS_BOO
ZEND_ARG_OBJ_INFO(0, object, tidy, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_tidy_repair_string, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_repair_string, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_INFO(0, config_file)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_tidy_repair_file, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_repair_file, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_INFO(0, config_file)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
@@ -44,7 +44,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_tidy_get_release, 0, 0, IS_STRIN
ZEND_END_ARG_INFO()
#if HAVE_TIDYOPTGETDOC
-ZEND_BEGIN_ARG_INFO_EX(arginfo_tidy_get_opt_doc, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_get_opt_doc, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, object, tidy, 0)
ZEND_ARG_TYPE_INFO(0, optname, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -72,7 +72,7 @@ ZEND_END_ARG_INFO()
#define arginfo_tidy_config_count arginfo_tidy_get_status
-ZEND_BEGIN_ARG_INFO_EX(arginfo_tidy_getopt, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_getopt, 0, 2, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_BOOL)
ZEND_ARG_OBJ_INFO(0, object, tidy, 0)
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/tokenizer/tokenizer.stub.php b/ext/tokenizer/tokenizer.stub.php
index 8abcd37811..f42825d7dc 100644
--- a/ext/tokenizer/tokenizer.stub.php
+++ b/ext/tokenizer/tokenizer.stub.php
@@ -1,6 +1,5 @@
<?php
-/** @return array|false */
-function token_get_all(string $source, int $flags = 0) {}
+function token_get_all(string $source, int $flags = 0): array|false {}
function token_name(int $token): string {}
diff --git a/ext/tokenizer/tokenizer_arginfo.h b/ext/tokenizer/tokenizer_arginfo.h
index f1b601358e..4cf8c65fe3 100644
--- a/ext/tokenizer/tokenizer_arginfo.h
+++ b/ext/tokenizer/tokenizer_arginfo.h
@@ -1,6 +1,6 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_token_get_all, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_token_get_all, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/xmlwriter/xmlwriter.stub.php b/ext/xmlwriter/xmlwriter.stub.php
index 0cdaf3bf39..a8f6833171 100644
--- a/ext/xmlwriter/xmlwriter.stub.php
+++ b/ext/xmlwriter/xmlwriter.stub.php
@@ -84,8 +84,7 @@ function xmlwriter_write_dtd_entity(XMLWriter $xmlwriter, string $name, string $
function xmlwriter_output_memory(XMLWriter $xmlwriter, bool $flush = true): string {}
-/** @return string|int */
-function xmlwriter_flush(XMLWriter $xmlwriter, bool $empty = true) {}
+function xmlwriter_flush(XMLWriter $xmlwriter, bool $empty = true): string|int {}
class XMLWriter
{
diff --git a/ext/xmlwriter/xmlwriter_arginfo.h b/ext/xmlwriter/xmlwriter_arginfo.h
index 1a356dd8eb..6daf7e0434 100644
--- a/ext/xmlwriter/xmlwriter_arginfo.h
+++ b/ext/xmlwriter/xmlwriter_arginfo.h
@@ -174,7 +174,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_output_memory, 0, 1, I
ZEND_ARG_TYPE_INFO(0, flush, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlwriter_flush, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xmlwriter_flush, 0, 1, MAY_BE_STRING|MAY_BE_LONG)
ZEND_ARG_OBJ_INFO(0, xmlwriter, XMLWriter, 0)
ZEND_ARG_TYPE_INFO(0, empty, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php
index 451372110a..e312bfd031 100644
--- a/ext/zip/php_zip.stub.php
+++ b/ext/zip/php_zip.stub.php
@@ -25,35 +25,20 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = 'rb'): bool {}
*/
function zip_entry_close($zip_ent): bool {}
-/**
- * @param resource $zip_entry
- * @return string|false
- */
-function zip_entry_read($zip_entry, int $len = 1024) {}
+/** @param resource $zip_entry */
+function zip_entry_read($zip_entry, int $len = 1024): string|false {}
-/**
- * @param resource $zip_entry
- * @return string|false
- */
-function zip_entry_name($zip_entry) {}
+/** @param resource $zip_entry */
+function zip_entry_name($zip_entry): string|false {}
-/**
- * @param resource $zip_entry
- * @return int|false
- */
-function zip_entry_compressedsize($zip_entry) {}
+/** @param resource $zip_entry */
+function zip_entry_compressedsize($zip_entry): int|false {}
-/**
- * @param resource $zip_entry
- * @return int|false
- */
-function zip_entry_filesize($zip_entry) {}
+/** @param resource $zip_entry */
+function zip_entry_filesize($zip_entry): int|false {}
-/**
- * @param resource $zip_entry
- * @return string|false
- */
-function zip_entry_compressionmethod($zip_entry) {}
+/** @param resource $zip_entry */
+function zip_entry_compressionmethod($zip_entry): string|false {}
class ZipArchive
{
diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h
index 1cb56c890d..ed5ecc6a31 100644
--- a/ext/zip/php_zip_arginfo.h
+++ b/ext/zip/php_zip_arginfo.h
@@ -22,18 +22,20 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_close, 0, 1, _IS_BOOL,
ZEND_ARG_INFO(0, zip_ent)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_entry_read, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_read, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, zip_entry)
ZEND_ARG_TYPE_INFO(0, len, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_entry_name, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, zip_entry)
ZEND_END_ARG_INFO()
-#define arginfo_zip_entry_compressedsize arginfo_zip_entry_name
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_compressedsize, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, zip_entry)
+ZEND_END_ARG_INFO()
-#define arginfo_zip_entry_filesize arginfo_zip_entry_name
+#define arginfo_zip_entry_filesize arginfo_zip_entry_compressedsize
#define arginfo_zip_entry_compressionmethod arginfo_zip_entry_name
diff --git a/ext/zlib/zlib.stub.php b/ext/zlib/zlib.stub.php
index 9b3fb04be4..25fd4e87b1 100644
--- a/ext/zlib/zlib.stub.php
+++ b/ext/zlib/zlib.stub.php
@@ -1,57 +1,37 @@
<?php
-/** @return string|false */
-function ob_gzhandler(string $data, int $flags) {}
+function ob_gzhandler(string $data, int $flags): string|false {}
-/** @return string|false */
-function zlib_get_coding_type() {}
+function zlib_get_coding_type(): string|false {}
-/** @return array|false */
-function gzfile(string $filename, int $use_include_path = 0) {}
+function gzfile(string $filename, int $use_include_path = 0): array|false {}
/** @return resource|false */
function gzopen(string $filename, string $mode, int $use_include_path = 0) {}
-/** @return int|false */
-function readgzfile(string $filename, int $use_include_path = 0) {}
+function readgzfile(string $filename, int $use_include_path = 0): int|false {}
-/** @return string|false */
-function zlib_encode(string $data, int $encoding, int $level = -1) {}
+function zlib_encode(string $data, int $encoding, int $level = -1): string|false {}
-/** @return string|false */
-function zlib_decode(string $data, int $max_decoded_len = 0) {}
+function zlib_decode(string $data, int $max_decoded_len = 0): string|false {}
-/** @return string|false */
-function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW) {}
+function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string|false {}
-/** @return string|false */
-function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP) {}
+function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string|false {}
-/** @return string|false */
-function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE) {}
+function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string|false {}
-/** @return string|false */
-function gzinflate(string $data, int $max_decoded_len = 0) {}
+function gzinflate(string $data, int $max_decoded_len = 0): string|false {}
-/** @return string|false */
-function gzdecode(string $data, int $max_decoded_len = 0) {}
+function gzdecode(string $data, int $max_decoded_len = 0): string|false {}
-/** @return string|false */
-function gzuncompress(string $data, int $max_decoded_len = 0) {}
+function gzuncompress(string $data, int $max_decoded_len = 0): string|false {}
-/**
- * @param resource $fp
- *
- * @return int|false
- */
-function gzwrite($fp, string $str, int $length = UNKNOWN) {};
+/** @param resource $fp */
+function gzwrite($fp, string $str, int $length = UNKNOWN): int|false {};
-/**
- * @param resource $fp
- *
- * @return int|false
- */
-function gzputs($fp, string $str, int $length = UNKNOWN) {};
+/** @param resource $fp */
+function gzputs($fp, string $str, int $length = UNKNOWN): int|false {};
/** @param resource $fp */
function gzrewind($fp): bool {};
@@ -62,12 +42,8 @@ function gzclose($fp): bool {};
/** @param resource $fp */
function gzeof($fp): bool {};
-/**
- * @param resource $fp
- *
- * @return string|false
- */
-function gzgetc($fp) {};
+/** @param resource $fp */
+function gzgetc($fp): string|false {};
/** @param resource $fp */
function gzpassthru($fp): int {};
@@ -75,57 +51,29 @@ function gzpassthru($fp): int {};
/** @param resource $fp */
function gzseek($fp, int $offset, int $whence = SEEK_SET): int {};
-/**
- * @param resource $fp
- *
- * @return int|false
- */
-function gztell($fp) {};
-
-/**
- * @param resource $fp
- *
- * @return string|false
- */
-function gzread($fp, int $length) {};
-
-/**
- * @param resource $fp
- *
- * @return string|false
- */
-function gzgets($fp, int $length = 1024) {};
+/** @param resource $fp */
+function gztell($fp): int|false {};
+
+/** @param resource $fp */
+function gzread($fp, int $length): string|false {};
+
+/** @param resource $fp */
+function gzgets($fp, int $length = 1024): string|false {};
/** @return resource|false */
function deflate_init(int $encoding, array $options = []) {};
-/**
- * @param resource $resource
- *
- * @return string|false
- */
-function deflate_add($resource, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH) {};
+/** @param resource $resource */
+function deflate_add($resource, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH): string|false {};
/** @return resource|false */
function inflate_init(int $encoding, array $options = []) {};
-/**
- * @param resource $context
- *
- * @return string|false
- */
-function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH) {};
-
-/**
- * @param resource $resource
- *
- * @return int|false
- */
-function inflate_get_status($resource) {};
-
-/**
- * @param resource $resource
- *
- * @return int|false
- */
-function inflate_get_read_len($resource) {};
+/** @param resource $context */
+function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {};
+
+/** @param resource $resource */
+function inflate_get_status($resource): int|false {};
+
+/** @param resource $resource */
+function inflate_get_read_len($resource): int|false {};
diff --git a/ext/zlib/zlib_arginfo.h b/ext/zlib/zlib_arginfo.h
index 46b9e74608..15f107922a 100644
--- a/ext/zlib/zlib_arginfo.h
+++ b/ext/zlib/zlib_arginfo.h
@@ -1,14 +1,14 @@
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_gzhandler, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ob_gzhandler, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_zlib_get_coding_type, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zlib_get_coding_type, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gzfile, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzfile, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, use_include_path, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -19,20 +19,23 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_gzopen, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, use_include_path, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_readgzfile arginfo_gzfile
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readgzfile, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, use_include_path, IS_LONG, 0)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_zlib_encode, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zlib_encode, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_zlib_decode, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zlib_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, max_decoded_len, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gzdeflate, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzdeflate, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, encoding, IS_LONG, 0)
@@ -48,7 +51,7 @@ ZEND_END_ARG_INFO()
#define arginfo_gzuncompress arginfo_zlib_decode
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gzwrite, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzwrite, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, fp)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
@@ -64,7 +67,7 @@ ZEND_END_ARG_INFO()
#define arginfo_gzeof arginfo_gzrewind
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gzgetc, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzgetc, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, fp)
ZEND_END_ARG_INFO()
@@ -78,14 +81,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gzseek, 0, 2, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, whence, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_gztell arginfo_gzgetc
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gztell, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, fp)
+ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gzread, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzread, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, fp)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_gzgets, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_gzgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, fp)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -95,7 +100,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_deflate_init, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_deflate_add, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_deflate_add, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, resource)
ZEND_ARG_TYPE_INFO(0, add, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flush_behavior, IS_LONG, 0)
@@ -103,13 +108,13 @@ ZEND_END_ARG_INFO()
#define arginfo_inflate_init arginfo_deflate_init
-ZEND_BEGIN_ARG_INFO_EX(arginfo_inflate_add, 0, 0, 2)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inflate_add, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, context)
ZEND_ARG_TYPE_INFO(0, encoded_data, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flush_mode, IS_LONG, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_inflate_get_status, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_inflate_get_status, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, resource)
ZEND_END_ARG_INFO()
diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt
index 4311d9b259..b1f756d17f 100644
--- a/sapi/cli/tests/006.phpt
+++ b/sapi/cli/tests/006.phpt
@@ -74,6 +74,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #3 [ <optional> int $flags ]
Parameter #4 [ <optional> int $offset ]
}
+ - Return [ int|false ]
}
Function [ <internal:pcre> function preg_match_all ] {
@@ -84,6 +85,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #3 [ <optional> int $flags ]
Parameter #4 [ <optional> int $offset ]
}
+ - Return [ int|false|null ]
}
Function [ <internal:pcre> function preg_replace ] {
@@ -94,6 +96,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #3 [ <optional> int $limit ]
Parameter #4 [ <optional> &$count ]
}
+ - Return [ array|string|null ]
}
Function [ <internal:pcre> function preg_replace_callback ] {
@@ -105,6 +108,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #4 [ <optional> &$count ]
Parameter #5 [ <optional> int $flags ]
}
+ - Return [ array|string|null ]
}
Function [ <internal:pcre> function preg_replace_callback_array ] {
@@ -115,6 +119,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #3 [ <optional> &$count ]
Parameter #4 [ <optional> int $flags ]
}
+ - Return [ array|string|null ]
}
Function [ <internal:pcre> function preg_filter ] {
@@ -125,6 +130,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #3 [ <optional> int $limit ]
Parameter #4 [ <optional> &$count ]
}
+ - Return [ array|string|null ]
}
Function [ <internal:pcre> function preg_split ] {
@@ -134,6 +140,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #2 [ <optional> int $limit ]
Parameter #3 [ <optional> int $flags ]
}
+ - Return [ array|false ]
}
Function [ <internal:pcre> function preg_quote ] {
@@ -150,6 +157,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Parameter #1 [ <required> array $input ]
Parameter #2 [ <optional> int $flags ]
}
+ - Return [ array|false ]
}
Function [ <internal:pcre> function preg_last_error ] {
diff --git a/sapi/phpdbg/phpdbg.stub.php b/sapi/phpdbg/phpdbg.stub.php
index cf6575de20..bcccc5f9d0 100644
--- a/sapi/phpdbg/phpdbg.stub.php
+++ b/sapi/phpdbg/phpdbg.stub.php
@@ -12,8 +12,7 @@ function phpdbg_color(int $element, string $color): void {}
function phpdbg_prompt(string $string): void {}
-/** @return string|bool */
-function phpdbg_exec(string $context) {}
+function phpdbg_exec(string $context): string|bool {}
function phpdbg_clear(): void {}
diff --git a/sapi/phpdbg/phpdbg_arginfo.h b/sapi/phpdbg/phpdbg_arginfo.h
index c59f6ecf0f..e130ebd33f 100644
--- a/sapi/phpdbg/phpdbg_arginfo.h
+++ b/sapi/phpdbg/phpdbg_arginfo.h
@@ -26,7 +26,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_prompt, 0, 1, IS_VOID, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_phpdbg_exec, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_phpdbg_exec, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, context, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/scripts/dev/gen_stub.php b/scripts/dev/gen_stub.php
index 2aed71af61..a02e23b256 100755
--- a/scripts/dev/gen_stub.php
+++ b/scripts/dev/gen_stub.php
@@ -108,6 +108,8 @@ class SimpleType {
public function toTypeMask() {
assert($this->isBuiltin);
switch (strtolower($this->name)) {
+ case "null":
+ return "MAY_BE_NULL";
case "false":
return "MAY_BE_FALSE";
case "bool":