summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-02-16 19:20:54 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-02-16 23:43:38 +0100
commitc31029f335ca1b453af799805c43c37e959ad555 (patch)
tree15f57cdb50525d2f05e0016c795a1ca7a72e17b9
parent6ee6097688a8c64e0e0ba166d48b16a93bf107a2 (diff)
downloadphp-git-c31029f335ca1b453af799805c43c37e959ad555.tar.gz
Replace @param annotations with type declarations
-rw-r--r--ext/dba/dba.stub.php15
-rw-r--r--ext/dba/dba_arginfo.h6
-rw-r--r--ext/gmp/gmp.stub.php3
-rw-r--r--ext/gmp/gmp_arginfo.h2
-rw-r--r--ext/intl/calendar/calendar.stub.php6
-rw-r--r--ext/intl/calendar/calendar_arginfo.h4
-rw-r--r--ext/intl/formatter/formatter.stub.php6
-rw-r--r--ext/intl/formatter/formatter_arginfo.h4
-rw-r--r--ext/intl/resourcebundle/resourcebundle.stub.php6
-rw-r--r--ext/intl/resourcebundle/resourcebundle_arginfo.h4
-rw-r--r--ext/ldap/ldap.stub.php12
-rw-r--r--ext/ldap/ldap_arginfo.h4
-rw-r--r--ext/mbstring/mbstring.stub.php6
-rw-r--r--ext/mbstring/mbstring_arginfo.h4
-rw-r--r--ext/odbc/odbc.stub.php3
-rw-r--r--ext/odbc/odbc_arginfo.h2
-rw-r--r--ext/openssl/openssl.stub.php6
-rw-r--r--ext/openssl/openssl_arginfo.h4
-rw-r--r--ext/pcre/php_pcre.stub.php22
-rw-r--r--ext/pcre/php_pcre_arginfo.h12
-rw-r--r--ext/pdo/pdo.stub.php3
-rw-r--r--ext/pdo/pdo_arginfo.h2
-rw-r--r--ext/reflection/php_reflection.stub.php18
-rw-r--r--ext/reflection/php_reflection_arginfo.h17
-rw-r--r--ext/reflection/tests/ReflectionClass_toString_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionMethod_basic2.phpt4
-rw-r--r--ext/snmp/snmp.stub.php74
-rw-r--r--ext/snmp/snmp_arginfo.h28
-rwxr-xr-xext/standard/basic_functions.stub.php35
-rwxr-xr-xext/standard/basic_functions_arginfo.h18
-rw-r--r--ext/tidy/tidy.stub.php27
-rw-r--r--ext/tidy/tidy_arginfo.h18
-rw-r--r--sapi/cli/tests/006.phpt18
33 files changed, 146 insertions, 249 deletions
diff --git a/ext/dba/dba.stub.php b/ext/dba/dba.stub.php
index 96ce6d573a..4c476a984b 100644
--- a/ext/dba/dba.stub.php
+++ b/ext/dba/dba.stub.php
@@ -10,17 +10,15 @@ function dba_open($path, $mode, $handlername = UNKNOWN, ...$handler_parameters)
function dba_close($handle): void {}
/**
- * @param string|array $key
* @param resource $handle
*/
-function dba_exists($key, $handle): bool {}
+function dba_exists(string|array $key, $handle): bool {}
/**
- * @param string|array $key
* @param int|resource $skip actually this parameter is optional, not $handle
* @param resource $handle
*/
-function dba_fetch($key, $skip, $handle = UNKOWN): string|false {}
+function dba_fetch(string|array $key, $skip, $handle = UNKOWN): string|false {}
function dba_key_split(string $key): array|false {}
@@ -31,22 +29,19 @@ function dba_firstkey($handle): string|false {}
function dba_nextkey($handle): string|false {}
/**
- * @param string|array $key
* @param resource $handle
*/
-function dba_delete($key, $handle): bool {}
+function dba_delete(string|array $key, $handle): bool {}
/**
- * @param string|array $key
* @param resource $handle
*/
-function dba_insert($key, string $value, $handle): bool {}
+function dba_insert(string|array $key, string $value, $handle): bool {}
/**
- * @param string|array $key
* @param resource $handle
*/
-function dba_replace($key, string $value, $handle): bool {}
+function dba_replace(string|array $key, string $value, $handle): bool {}
/** @param resource $handle */
function dba_optimize($handle): bool {}
diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h
index 32e925fb6a..0b14c33a57 100644
--- a/ext/dba/dba_arginfo.h
+++ b/ext/dba/dba_arginfo.h
@@ -14,12 +14,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_close, 0, 1, IS_VOID, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_exists, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, key)
+ ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
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_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_INFO(0, skip)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
@@ -37,7 +37,7 @@ ZEND_END_ARG_INFO()
#define arginfo_dba_delete arginfo_dba_exists
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_insert, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, key)
+ ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
diff --git a/ext/gmp/gmp.stub.php b/ext/gmp/gmp.stub.php
index 7f576ca0c1..2fedff9458 100644
--- a/ext/gmp/gmp.stub.php
+++ b/ext/gmp/gmp.stub.php
@@ -1,7 +1,6 @@
<?php
-/** @param int|bool|string $number */
-function gmp_init($number, int $base = 0): GMP|false {}
+function gmp_init(int|bool|string $number, int $base = 0): GMP|false {}
function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP|false {}
diff --git a/ext/gmp/gmp_arginfo.h b/ext/gmp/gmp_arginfo.h
index 714bd046e2..448b6b303a 100644
--- a/ext/gmp/gmp_arginfo.h
+++ b/ext/gmp/gmp_arginfo.h
@@ -1,7 +1,7 @@
/* This is a generated file, edit the .stub.php file instead. */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_init, 0, 1, GMP, MAY_BE_FALSE)
- ZEND_ARG_INFO(0, number)
+ ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_BOOL|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, base, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/intl/calendar/calendar.stub.php b/ext/intl/calendar/calendar.stub.php
index 267035e268..f057d579b6 100644
--- a/ext/intl/calendar/calendar.stub.php
+++ b/ext/intl/calendar/calendar.stub.php
@@ -116,10 +116,9 @@ class IntlCalendar
public function isWeekend(?float $date = null) {}
/**
- * @param int|bool $amountOrUpOrDown
* @return bool
*/
- public function roll(int $field, $amountOrUpOrDown) {}
+ public function roll(int $field, int|bool $amountOrUpOrDown) {}
/** @return bool */
public function isSet(int $field) {}
@@ -198,8 +197,7 @@ function intlcal_before(IntlCalendar $calendarObject, IntlCalendar $calendar): b
function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): bool {}
-/** @param int|bool $amountOrUpOrDown */
-function intlcal_roll(IntlCalendar $calendar, int $field, $amountOrUpOrDown): bool {}
+function intlcal_roll(IntlCalendar $calendar, int $field, int|bool $amountOrUpOrDown): bool {}
function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
diff --git a/ext/intl/calendar/calendar_arginfo.h b/ext/intl/calendar/calendar_arginfo.h
index efe89030ec..47bc248ff8 100644
--- a/ext/intl/calendar/calendar_arginfo.h
+++ b/ext/intl/calendar/calendar_arginfo.h
@@ -105,7 +105,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_roll, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
- ZEND_ARG_INFO(0, amountOrUpOrDown)
+ ZEND_ARG_TYPE_MASK(0, amountOrUpOrDown, MAY_BE_LONG|MAY_BE_BOOL)
ZEND_END_ARG_INFO()
#define arginfo_class_IntlCalendar_isSet arginfo_class_IntlCalendar_get
@@ -217,7 +217,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_roll, 0, 3, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
- ZEND_ARG_INFO(0, amountOrUpOrDown)
+ ZEND_ARG_TYPE_MASK(0, amountOrUpOrDown, MAY_BE_LONG|MAY_BE_BOOL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_clear, 0, 1, _IS_BOOL, 0)
diff --git a/ext/intl/formatter/formatter.stub.php b/ext/intl/formatter/formatter.stub.php
index 2edc28d6fd..b210ebe888 100644
--- a/ext/intl/formatter/formatter.stub.php
+++ b/ext/intl/formatter/formatter.stub.php
@@ -20,10 +20,9 @@ class NumberFormatter
public function parseCurrency(string $value, &$currency, &$position = null) {}
/**
- * @param int|float $value
* @return bool
*/
- public function setAttribute(int $attr, $value) {}
+ public function setAttribute(int $attr, int|float $value) {}
/** @return int|float|false */
public function getAttribute(int $attr) {}
@@ -66,8 +65,7 @@ function numfmt_format_currency(NumberFormatter $fmt, float $value, string $curr
function numfmt_parse_currency(NumberFormatter $fmt, string $value, &$currency, &$position = null): float|false {}
-/** @param int|float $value */
-function numfmt_set_attribute(NumberFormatter $fmt, int $attr, $value): bool {}
+function numfmt_set_attribute(NumberFormatter $fmt, int $attr, int|float $value): bool {}
function numfmt_get_attribute(NumberFormatter $fmt, int $attr): int|double|false {}
diff --git a/ext/intl/formatter/formatter_arginfo.h b/ext/intl/formatter/formatter_arginfo.h
index eced76d82b..26de20d749 100644
--- a/ext/intl/formatter/formatter_arginfo.h
+++ b/ext/intl/formatter/formatter_arginfo.h
@@ -32,7 +32,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_setAttribute, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
- ZEND_ARG_INFO(0, value)
+ ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_getAttribute, 0, 0, 1)
@@ -100,7 +100,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_set_attribute, 0, 3, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
- ZEND_ARG_INFO(0, value)
+ ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_numfmt_get_attribute, 0, 2, double, MAY_BE_LONG|MAY_BE_FALSE)
diff --git a/ext/intl/resourcebundle/resourcebundle.stub.php b/ext/intl/resourcebundle/resourcebundle.stub.php
index 14f10fea4b..e1dd22b6cb 100644
--- a/ext/intl/resourcebundle/resourcebundle.stub.php
+++ b/ext/intl/resourcebundle/resourcebundle.stub.php
@@ -8,10 +8,9 @@ class ResourceBundle implements Traversable
public static function create(?string $locale, ?string $bundlename, bool $fallback = true) {}
/**
- * @param string|int $index
* @return mixed
*/
- public function get($index, bool $fallback = true) {}
+ public function get(string|int $index, bool $fallback = true) {}
/** @return int */
public function count() {}
@@ -29,10 +28,9 @@ class ResourceBundle implements Traversable
function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true): ?ResourceBundle {}
/**
- * @param string|int $index
* @return mixed
*/
-function resourcebundle_get(ResourceBundle $bundle, $index) {}
+function resourcebundle_get(ResourceBundle $bundle, string|int $index) {}
function resourcebundle_count(ResourceBundle $bundle): int {}
diff --git a/ext/intl/resourcebundle/resourcebundle_arginfo.h b/ext/intl/resourcebundle/resourcebundle_arginfo.h
index 855b8b548c..627e7150a0 100644
--- a/ext/intl/resourcebundle/resourcebundle_arginfo.h
+++ b/ext/intl/resourcebundle/resourcebundle_arginfo.h
@@ -9,7 +9,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_ResourceBundle_create arginfo_class_ResourceBundle___construct
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_get, 0, 0, 1)
- ZEND_ARG_INFO(0, index)
+ ZEND_ARG_TYPE_MASK(0, index, MAY_BE_STRING|MAY_BE_LONG)
ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -32,7 +32,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2)
ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)
- ZEND_ARG_INFO(0, index)
+ ZEND_ARG_TYPE_MASK(0, index, MAY_BE_STRING|MAY_BE_LONG)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_count, 0, 1, IS_LONG, 0)
diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php
index e8a2fc8a32..ac0f993920 100644
--- a/ext/ldap/ldap.stub.php
+++ b/ext/ldap/ldap.stub.php
@@ -40,27 +40,21 @@ function ldap_sasl_bind($link, string $binddn = UNKNOWN, string $password = UNKN
/**
* @param resource|array $link_identifier
- * @param string|array $base_dn
- * @param string|array $filter
* @return resource|false
*/
-function ldap_read($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
+function ldap_read($link_identifier, string|array $base_dn, string|array $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
/**
* @param resource|array $link_identifier
- * @param string|array $base_dn
- * @param string|array $filter
* @return resource|false
*/
-function ldap_list($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
+function ldap_list($link_identifier, string|array $base_dn, string|array $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
/**
* @param resource|array $link_identifier
- * @param string|array $base_dn
- * @param string|array $filter
* @return resource|false
*/
-function ldap_search($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
+function ldap_search($link_identifier, string|array $base_dn, string|array $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
/**
* @param resource $link_identifier
diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h
index c7e5429bdf..e75cb0d518 100644
--- a/ext/ldap/ldap_arginfo.h
+++ b/ext/ldap/ldap_arginfo.h
@@ -51,8 +51,8 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_read, 0, 0, 3)
ZEND_ARG_INFO(0, link_identifier)
- ZEND_ARG_INFO(0, base_dn)
- ZEND_ARG_INFO(0, filter)
+ ZEND_ARG_TYPE_MASK(0, base_dn, MAY_BE_STRING|MAY_BE_ARRAY)
+ ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, attributes, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, attrsonly, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, sizelimit, IS_LONG, 0)
diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php
index afe9f50e88..0c5f631a96 100644
--- a/ext/mbstring/mbstring.stub.php
+++ b/ext/mbstring/mbstring.stub.php
@@ -48,8 +48,7 @@ function mb_strwidth(string $str, string $encoding = UNKNOWN): int|false {}
function mb_strimwidth(string $str, int $start, int $width, string $trimmarker = UNKNOWN, string $encoding = UNKNOWN): string|false {}
-/** @param array|string $str */
-function mb_convert_encoding($str, string $to, $from = UNKNOWN): array|string|false {}
+function mb_convert_encoding(array|string $str, string $to, $from = UNKNOWN): array|string|false {}
function mb_convert_case(string $sourcestring, int $mode, ?string $encoding = null): string|false {}
@@ -70,8 +69,7 @@ function mb_decode_mimeheader(string $string): string|false {}
function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding = UNKNOWN): string|false {}
-/** @param array|string $from */
-function mb_convert_variables(string $to, $from, &$var, &...$vars): string|false {}
+function mb_convert_variables(string $to, array|string $from, &$var, &...$vars): string|false {}
function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false): string|false {}
diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h
index 0fd3034bd9..4bb2531173 100644
--- a/ext/mbstring/mbstring_arginfo.h
+++ b/ext/mbstring/mbstring_arginfo.h
@@ -104,7 +104,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strimwidth, 0, 3, MAY_BE_STRI
ZEND_END_ARG_INFO()
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_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
ZEND_ARG_INFO(0, from)
ZEND_END_ARG_INFO()
@@ -155,7 +155,7 @@ ZEND_END_ARG_INFO()
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_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_INFO(1, var)
ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php
index 9eafe46ae5..814b8fba71 100644
--- a/ext/odbc/odbc.stub.php
+++ b/ext/odbc/odbc.stub.php
@@ -53,9 +53,8 @@ function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {}
/**
* @param resource $result_id
- * @param string|int $field
*/
-function odbc_result($result_id, $field): string|bool|null {}
+function odbc_result($result_id, string|int $field): string|bool|null {}
/** @param resource $result_id */
function odbc_result_all($result_id, string $format = ''): int|false {}
diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h
index 41f00cb2a0..1a462ee0dc 100644
--- a/ext/odbc/odbc_arginfo.h
+++ b/ext/odbc/odbc_arginfo.h
@@ -69,7 +69,7 @@ ZEND_END_ARG_INFO()
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_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php
index e75f79c906..d69ccd5306 100644
--- a/ext/openssl/openssl.stub.php
+++ b/ext/openssl/openssl.stub.php
@@ -123,15 +123,13 @@ function openssl_error_string(): string|false {}
/**
* @param resource|string|array $key
- * @param int|string $method
*/
-function openssl_sign(string $data, &$signature, $key, $method = OPENSSL_ALGO_SHA1): bool {}
+function openssl_sign(string $data, &$signature, $key, int|string $method = OPENSSL_ALGO_SHA1): bool {}
/**
* @param resource|string|array $key
- * @param int|string $method
*/
-function openssl_verify(string $data, string $signature, $key, $method = OPENSSL_ALGO_SHA1): int|false {}
+function openssl_verify(string $data, string $signature, $key, int|string $method = OPENSSL_ALGO_SHA1): int|false {}
function openssl_seal(string $data, &$sealdata, &$ekeys, array $pubkeys, string $method = UNKNOWN, &$iv = UNKNOWN): int|false {}
diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h
index 9f8835ec13..6b6736329a 100644
--- a/ext/openssl/openssl_arginfo.h
+++ b/ext/openssl/openssl_arginfo.h
@@ -210,14 +210,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_sign, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_INFO(1, signature)
ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, method)
+ ZEND_ARG_TYPE_MASK(0, method, MAY_BE_LONG|MAY_BE_STRING)
ZEND_END_ARG_INFO()
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_ARG_TYPE_MASK(0, method, MAY_BE_LONG|MAY_BE_STRING)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_seal, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
diff --git a/ext/pcre/php_pcre.stub.php b/ext/pcre/php_pcre.stub.php
index 397ab22159..01399f0fbc 100644
--- a/ext/pcre/php_pcre.stub.php
+++ b/ext/pcre/php_pcre.stub.php
@@ -4,30 +4,16 @@ function preg_match(string $pattern, string $subject, &$subpatterns = null, int
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
- */
-function preg_replace($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {}
+function preg_replace(string|array $regex, string|array $replace, string|array $subject, int $limit = -1, &$count = null): string|array|null {}
-/**
- * @param string|array $regex
- * @param string|array $replace
- * @param string|array $subject
- */
-function preg_filter($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {}
+function preg_filter(string|array $regex, string|array $replace, string|array $subject, int $limit = -1, &$count = null): string|array|null {}
/**
- * @param string|array $regex
- * @param string|array $subject
- *
* TODO: $callback should be `callable`
*/
-function preg_replace_callback($regex, $callback, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
+function preg_replace_callback(string|array $regex, $callback, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
-/** @param string|array $subject */
-function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
+function preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array|false {}
diff --git a/ext/pcre/php_pcre_arginfo.h b/ext/pcre/php_pcre_arginfo.h
index 4c7308baab..2abe7c8dea 100644
--- a/ext/pcre/php_pcre_arginfo.h
+++ b/ext/pcre/php_pcre_arginfo.h
@@ -17,9 +17,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match_all, 0, 2, MAY_BE_LON
ZEND_END_ARG_INFO()
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)
+ ZEND_ARG_TYPE_MASK(0, regex, MAY_BE_STRING|MAY_BE_ARRAY)
+ ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY)
+ ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0)
ZEND_ARG_INFO(1, count)
ZEND_END_ARG_INFO()
@@ -27,9 +27,9 @@ ZEND_END_ARG_INFO()
#define arginfo_preg_filter arginfo_preg_replace
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_TYPE_MASK(0, regex, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_INFO(0, callback)
- ZEND_ARG_INFO(0, subject)
+ ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0)
ZEND_ARG_INFO(1, count)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
@@ -37,7 +37,7 @@ ZEND_END_ARG_INFO()
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_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, limit, IS_LONG, 0)
ZEND_ARG_INFO(1, count)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
diff --git a/ext/pdo/pdo.stub.php b/ext/pdo/pdo.stub.php
index 13969edb57..190710c4ed 100644
--- a/ext/pdo/pdo.stub.php
+++ b/ext/pdo/pdo.stub.php
@@ -71,11 +71,10 @@ class PDOStatement implements Traversable {
public function bindParam(int|string $parameter, &$param, int $type = PDO::PARAM_STR, int $maxlen = 0, $driverdata = null) {}
/**
- * @param int|string $parameter
* @param mixed $value
* @return bool
*/
- public function bindValue($parameter, $value, int $type = PDO::PARAM_STR) {}
+ public function bindValue(int|string $parameter, $value, int $type = PDO::PARAM_STR) {}
/** @return bool */
public function closeCursor() {}
diff --git a/ext/pdo/pdo_arginfo.h b/ext/pdo/pdo_arginfo.h
index 56c1825198..ee06f81ee5 100644
--- a/ext/pdo/pdo_arginfo.h
+++ b/ext/pdo/pdo_arginfo.h
@@ -71,7 +71,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindParam, 0, 0, 2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindValue, 0, 0, 2)
- ZEND_ARG_INFO(0, parameter)
+ ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING)
ZEND_ARG_INFO(0, value)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php
index 76cbe75dd7..7b11913d7b 100644
--- a/ext/reflection/php_reflection.stub.php
+++ b/ext/reflection/php_reflection.stub.php
@@ -144,8 +144,7 @@ class ReflectionGenerator
class ReflectionMethod extends ReflectionFunctionAbstract
{
- /** @param object|string $class_or_method */
- public function __construct($class_or_method, string $name = UNKNOWN) {}
+ public function __construct(object|string $class_or_method, string $name = UNKNOWN) {}
/** @return string */
public function __toString() {}
@@ -202,8 +201,7 @@ class ReflectionClass implements Reflector
public static function export($argument, bool $return = false) {}
- /** @param object|string $argument */
- public function __construct($argument) {}
+ public function __construct(object|string $argument) {}
/** @return string */
public function __toString() {}
@@ -376,8 +374,7 @@ class ReflectionProperty implements Reflector
public static function export($class, $name, bool $return = false) {}
- /** @param string|object $class */
- public function __construct($class, string $name) {}
+ public function __construct(string|object $class, string $name) {}
/** @return string */
public function __toString() {}
@@ -474,11 +471,7 @@ class ReflectionParameter implements Reflector
public static function export($function, $parameter, bool $return = false) {}
- /**
- * @param string|array|object
- * @param int|string
- */
- public function __construct($function, $parameter) {}
+ public function __construct(string|array|object $function, int|string $parameter) {}
/** @return string */
public function __toString() {}
@@ -636,8 +629,7 @@ class ReflectionZendExtension implements Reflector
final class ReflectionReference
{
- /** @param int|string $key */
- public static function fromArrayElement(array $array, $key): ?ReflectionReference {}
+ public static function fromArrayElement(array $array, int|string $key): ?ReflectionReference {}
public function getId(): string {}
diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h
index 35ee713732..fc6eac9a06 100644
--- a/ext/reflection/php_reflection_arginfo.h
+++ b/ext/reflection/php_reflection_arginfo.h
@@ -106,7 +106,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_ReflectionGenerator_getExecutingGenerator arginfo_class_Reflector___toString
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod___construct, 0, 0, 1)
- ZEND_ARG_INFO(0, class_or_method)
+ ZEND_ARG_TYPE_MASK(0, class_or_method, MAY_BE_OBJECT|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -166,7 +166,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_export, 0, 0, 1)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass___construct, 0, 0, 1)
- ZEND_ARG_INFO(0, argument)
+ ZEND_ARG_TYPE_MASK(0, argument, MAY_BE_OBJECT|MAY_BE_STRING)
ZEND_END_ARG_INFO()
#define arginfo_class_ReflectionClass___toString arginfo_class_Reflector___toString
@@ -300,7 +300,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_ReflectionProperty_export arginfo_class_ReflectionMethod_export
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty___construct, 0, 0, 2)
- ZEND_ARG_INFO(0, class)
+ ZEND_ARG_TYPE_MASK(0, class, MAY_BE_STRING|MAY_BE_OBJECT)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -350,7 +350,10 @@ ZEND_END_ARG_INFO()
#define arginfo_class_ReflectionClassConstant_export arginfo_class_ReflectionMethod_export
-#define arginfo_class_ReflectionClassConstant___construct arginfo_class_ReflectionProperty___construct
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClassConstant___construct, 0, 0, 2)
+ ZEND_ARG_INFO(0, class)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ZEND_END_ARG_INFO()
#define arginfo_class_ReflectionClassConstant___toString arginfo_class_Reflector___toString
@@ -379,8 +382,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter_export, 0, 0, 2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2)
- ZEND_ARG_INFO(0, function)
- ZEND_ARG_INFO(0, parameter)
+ ZEND_ARG_TYPE_MASK(0, function, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT)
+ ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING)
ZEND_END_ARG_INFO()
#define arginfo_class_ReflectionParameter___toString arginfo_class_Reflector___toString
@@ -484,7 +487,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ReflectionReference_fromArrayElement, 0, 2, ReflectionReference, 1)
ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0)
- ZEND_ARG_INFO(0, key)
+ ZEND_ARG_TYPE_MASK(0, key, MAY_BE_LONG|MAY_BE_STRING)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionReference_getId, 0, 0, IS_STRING, 0)
diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt
index a70e09fa68..9708eb3eec 100644
--- a/ext/reflection/tests/ReflectionClass_toString_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt
@@ -44,7 +44,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
Method [ <internal:Reflection, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <required> $argument ]
+ Parameter #0 [ <required> object|string $argument ]
}
}
diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt
index 46abc6b816..e460545e55 100644
--- a/ext/reflection/tests/ReflectionMethod_basic2.phpt
+++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt
@@ -165,7 +165,7 @@ __toString():
string(%d) "Method [ <internal:Reflection, ctor> public method __construct ] {
- Parameters [2] {
- Parameter #0 [ <required> $class ]
+ Parameter #0 [ <required> object|string $class ]
Parameter #1 [ <required> string $name ]
}
}
@@ -177,7 +177,7 @@ Deprecated: Function ReflectionMethod::export() is deprecated in %s on line %d
string(%d) "Method [ <internal:Reflection, ctor> public method __construct ] {
- Parameters [2] {
- Parameter #0 [ <required> $class ]
+ Parameter #0 [ <required> object|string $class ]
Parameter #1 [ <required> string $name ]
}
}
diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php
index ce085637be..5f6b8fe3d6 100644
--- a/ext/snmp/snmp.stub.php
+++ b/ext/snmp/snmp.stub.php
@@ -1,26 +1,16 @@
<?php
-/** @param array|string $object_id */
-function snmpget(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmpget(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmpgetnext(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmpgetnext(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmpwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmpwalk(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmprealwalk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmprealwalk(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmpwalkoid(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmpwalkoid(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @param array|string $type
- * @param array|string $value
- */
-function snmpset(string $host, string $community, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmpset(string $host, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
function snmp_get_quick_print(): bool {}
@@ -32,43 +22,25 @@ 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 */
-function snmp2_get(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmp2_get(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmp2_getnext(string $host, string $community, $object_id, int $timeout = UNKOWN, int $retries = UNKNOWN): array|bool {}
+function snmp2_getnext(string $host, string $community, array|string $object_id, int $timeout = UNKOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmp2_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmp2_walk(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @param array|string $object_id */
-function snmp2_real_walk(string $host, string $community, $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmp2_real_walk(string $host, string $community, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @param array|string $type
- * @param array|string $value
- */
-function snmp2_set(string $host, string $community, $object_id, $type, $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
+function snmp2_set(string $host, string $community, array|string $object_id, array|string $type, array|string $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @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 {}
+function snmp3_get(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @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 {}
+function snmp3_getnext(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKOWN): array|bool {}
-/** @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 {}
+function snmp3_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/** @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 {}
+function snmp3_real_walk(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, array|string $object_id, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
-/**
- * @param array|string $object_id
- * @param array|string $type
- * @param array|string $value
- */
-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 snmp3_set(string $host, string $sec_name, string $sec_level, string $auth_protocol, string $auth_passphrase, string $priv_protocol, string $priv_passphrase, array|string $object_id, array|string $type, array|string $value, int $timeout = UNKNOWN, int $retries = UNKNOWN): array|bool {}
function snmp_set_valueretrieval(int $method): bool {}
@@ -87,30 +59,24 @@ class SNMP
function setSecurity(string $sec_level, string $auth_protocol = '', string $auth_passphrase = '', string $priv_protocol = '', string $priv_passphrase = '', string $contextName = '', string $contextEngineID = '') {}
/**
- * @param array|string $object_id
* @return array|bool
*/
- function get($object_id, bool $use_orignames = false) {}
+ function get(array|string $object_id, bool $use_orignames = false) {}
/**
- * @param array|string $object_id
* @return array|bool
*/
- function getnext($object_id) {}
+ function getnext(array|string $object_id) {}
/**
- * @param array|string $object_id
* @return array|bool
*/
- function walk($object_id, bool $suffix_keys = false, int $max_repetitions = UNKNOWN, int $non_repeaters = UNKNOWN) {}
+ function walk(array|string $object_id, bool $suffix_keys = false, int $max_repetitions = UNKNOWN, int $non_repeaters = UNKNOWN) {}
/**
- * @param array|string $object_id
- * @param array|string $type
- * @param array|string $value
* @return array|bool
*/
- function set($object_id, $type, $value) {}
+ function set(array|string $object_id, array|string $type, array|string $value) {}
/** @return int */
function getErrno() {}
diff --git a/ext/snmp/snmp_arginfo.h b/ext/snmp/snmp_arginfo.h
index fdafded7d3..d2981d6ed6 100644
--- a/ext/snmp/snmp_arginfo.h
+++ b/ext/snmp/snmp_arginfo.h
@@ -3,7 +3,7 @@
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)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -19,9 +19,9 @@ ZEND_END_ARG_INFO()
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)
- ZEND_ARG_INFO(0, type)
- ZEND_ARG_INFO(0, value)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, type, MAY_BE_ARRAY|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -61,7 +61,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_get, 0, 8, MAY_BE_ARRAY|MA
ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, priv_protocol, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, priv_passphrase, IS_STRING, 0)
- ZEND_ARG_INFO(0, object_id)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -80,9 +80,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_set, 0, 10, MAY_BE_ARRAY|M
ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, priv_protocol, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, priv_passphrase, IS_STRING, 0)
- ZEND_ARG_INFO(0, object_id)
- ZEND_ARG_INFO(0, type)
- ZEND_ARG_INFO(0, value)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, type, MAY_BE_ARRAY|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, retries, IS_LONG, 0)
ZEND_END_ARG_INFO()
@@ -120,25 +120,25 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_setSecurity, 0, 0, 1)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_get, 0, 0, 1)
- ZEND_ARG_INFO(0, object_id)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, use_orignames, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_getnext, 0, 0, 1)
- ZEND_ARG_INFO(0, object_id)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_walk, 0, 0, 1)
- ZEND_ARG_INFO(0, object_id)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, suffix_keys, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, max_repetitions, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, non_repeaters, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP_set, 0, 0, 3)
- ZEND_ARG_INFO(0, object_id)
- ZEND_ARG_INFO(0, type)
- ZEND_ARG_INFO(0, value)
+ ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, type, MAY_BE_ARRAY|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_END_ARG_INFO()
#define arginfo_class_SNMP_getErrno arginfo_class_SNMP_close
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index 1d2179fe62..29b4169579 100755
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -123,9 +123,8 @@ function array_fill_keys(array $keys, $val): array {}
/**
* @param int|float|string $low
* @param int|float|string $high
- * @param int|float $step
*/
-function range($low, $high, $step = 1): array {}
+function range($low, $high, int|float $step = 1): array {}
function shuffle(array &$arg): bool {}
@@ -160,10 +159,9 @@ function array_values(array $arg): array {}
function array_count_values(array $arg): array {}
/**
- * @param int|string|null $column_key
* @param int|string|null $index_key
*/
-function array_column(array $arg, $column_key, $index_key = null): array {}
+function array_column(array $arg, int|string|null $column_key, $index_key = null): array {}
function array_reverse(array $input, bool $preserve_keys = false): array {}
@@ -476,11 +474,9 @@ function header(string $string, bool $replace = true, int $http_response_code =
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 {}
+function setrawcookie(string $name, string $value = '', int|array $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 {}
+function setcookie(string $name, string $value = '', int|array $expires_or_options = 0, string $path = '', string $domain = '', bool $secure = false, bool $httponly = false): bool {}
function http_response_code(int $response_code = 0): int|bool {}
@@ -602,20 +598,16 @@ function stripcslashes(string $str): string {}
function stripslashes(string $str): string {}
/**
- * @param string|array $search
- * @param string|array $replace
* @param int $replace_count
*/
function str_replace(
- $search, $replace, string|array $subject, &$replace_count = UNKNOWN): string|array {}
+ string|array $search, string|array $replace, string|array $subject, &$replace_count = UNKNOWN): string|array {}
/**
- * @param string|array $search
- * @param string|array $replace
* @param int $replace_count
*/
function str_ireplace(
- $search, $replace, string|array $subject, &$replace_count = UNKNOWN): string|array {}
+ string|array $search, string|array $replace, string|array $subject, &$replace_count = UNKNOWN): string|array {}
function hebrev(string $str, int $max_chars_per_line = 0): string {}
@@ -624,10 +616,7 @@ function nl2br(string $str, bool $is_xhtml = true): string {}
/** @param mixed $allowable_tags */
function strip_tags(string $str, $allowable_tags = UNKNOWN): string {}
-/**
- * @param string|array $locales
- */
-function setlocale(int $category, $locales, ...$rest): string|false {}
+function setlocale(int $category, string|array $locales, ...$rest): string|false {}
/** @param array $result */
function parse_str(string $encoded_string, &$result): void {}
@@ -1186,10 +1175,9 @@ function stream_context_get_params($context): array {}
/**
* @param resource $context
- * @param array|string $param2
* @param mixed $value
*/
-function stream_context_set_option($context, $param2, string $option_name = UNKNOWN, $value = UNKNOWN): bool {}
+function stream_context_set_option($context, array|string $param2, string $option_name = UNKNOWN, $value = UNKNOWN): bool {}
/** @param resource $stream_or_context */
function stream_context_get_options($stream_or_context): array {}
@@ -1231,7 +1219,6 @@ function stream_socket_server(string $local_socket, &$errno = null, &$errstr = n
/**
* @param resource $server_socket
- * @param float $timeout
* @return resource|false
*/
function stream_socket_accept($server_socket, float $timeout = UNKNOWN, &$peername = null) {}
@@ -1457,11 +1444,7 @@ function sapi_windows_cp_set(int $cp): bool {}
function sapi_windows_cp_get(string $kind = UNKNOWN): int {}
-/**
- * @param int|string $in_codepage
- * @param int|string $out_codepage
- */
-function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject) {}
+function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject) {}
function sapi_windows_cp_is_utf8(): bool {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 98c7ff77f7..9c81d4271d 100755
--- a/ext/standard/basic_functions_arginfo.h
+++ b/ext/standard/basic_functions_arginfo.h
@@ -176,7 +176,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_range, 0, 2, IS_ARRAY, 0)
ZEND_ARG_INFO(0, low)
ZEND_ARG_INFO(0, high)
- ZEND_ARG_INFO(0, step)
+ ZEND_ARG_TYPE_MASK(0, step, MAY_BE_LONG|MAY_BE_DOUBLE)
ZEND_END_ARG_INFO()
#define arginfo_shuffle arginfo_natsort
@@ -239,7 +239,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_column, 0, 2, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, arg, IS_ARRAY, 0)
- ZEND_ARG_INFO(0, column_key)
+ ZEND_ARG_TYPE_MASK(0, column_key, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL)
ZEND_ARG_INFO(0, index_key)
ZEND_END_ARG_INFO()
@@ -734,7 +734,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_setrawcookie, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
- ZEND_ARG_INFO(0, expires_or_options)
+ ZEND_ARG_TYPE_MASK(0, expires_or_options, MAY_BE_LONG|MAY_BE_ARRAY)
ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, secure, _IS_BOOL, 0)
@@ -958,8 +958,8 @@ ZEND_END_ARG_INFO()
#define arginfo_stripslashes arginfo_base64_encode
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_TYPE_MASK(0, search, MAY_BE_STRING|MAY_BE_ARRAY)
+ ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_INFO(1, replace_count)
ZEND_END_ARG_INFO()
@@ -983,7 +983,7 @@ ZEND_END_ARG_INFO()
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_TYPE_MASK(0, locales, MAY_BE_STRING|MAY_BE_ARRAY)
ZEND_ARG_VARIADIC_INFO(0, rest)
ZEND_END_ARG_INFO()
@@ -1845,7 +1845,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_context_set_option, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(0, context)
- ZEND_ARG_INFO(0, param2)
+ ZEND_ARG_TYPE_MASK(0, param2, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, option_name, IS_STRING, 0)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
@@ -2170,8 +2170,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_cp_get, 0, 0, IS_LO
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_sapi_windows_cp_conv, 0, 0, 3)
- ZEND_ARG_INFO(0, in_codepage)
- ZEND_ARG_INFO(0, out_codepage)
+ ZEND_ARG_TYPE_MASK(0, in_codepage, MAY_BE_LONG|MAY_BE_STRING)
+ ZEND_ARG_TYPE_MASK(0, out_codepage, MAY_BE_LONG|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/tidy/tidy.stub.php b/ext/tidy/tidy.stub.php
index 423fecb090..44c2e44025 100644
--- a/ext/tidy/tidy.stub.php
+++ b/ext/tidy/tidy.stub.php
@@ -1,22 +1,18 @@
<?php
-/** @param array|string $config_options */
-function tidy_parse_string(string $input, $config_options = UNKNOWN, string $encoding = UNKNOWN): tidy|false {}
+function tidy_parse_string(string $input, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN): tidy|false {}
function tidy_get_error_buffer(tidy $object): string|false {}
function tidy_get_output(tidy $object): string {}
-/** @param array|string $config_options */
-function tidy_parse_file(string $file, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): tidy|false {}
+function tidy_parse_file(string $file, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): tidy|false {}
function tidy_clean_repair(tidy $object): bool {}
-/** @param array|string $config_options */
-function tidy_repair_string(string $data, $config_options = UNKNOWN, string $encoding = UNKNOWN): string|false {}
+function tidy_repair_string(string $data, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN): string|false {}
-/** @param array|string $config_options */
-function tidy_repair_file(string $filename, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): string|false {}
+function tidy_repair_file(string $filename, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): string|false {}
function tidy_diagnose(tidy $object): bool {}
@@ -56,25 +52,20 @@ function tidy_get_body(tidy $tidy): ?tidyNode {}
class tidy
{
- /** @param array|string $config_options */
- public function __construct(string $filename = UNKNOWN, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false) {}
+ public function __construct(string $filename = UNKNOWN, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false) {}
/** @return string|int|bool */
public function getOpt(string $option) {}
public function cleanRepair(): bool {}
- /** @param array|string $config_options */
- public function parseFile(string $file, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): bool {}
+ public function parseFile(string $file, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): bool {}
- /** @param array|string $config_options */
- public function parseString(string $input, $config_options = UNKNOWN, string $encoding = UNKNOWN): bool {}
+ public function parseString(string $input, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN): bool {}
- /** @param array|string $config_options */
- public function repairString(string $data, $config_options = UNKNOWN, string $encoding = UNKNOWN): bool {}
+ public function repairString(string $data, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN): bool {}
- /** @param array|string $config_options */
- public function repairFile(string $filename, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): bool {}
+ public function repairFile(string $filename, array|string $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): bool {}
public function diagnose(): bool {}
diff --git a/ext/tidy/tidy_arginfo.h b/ext/tidy/tidy_arginfo.h
index 7c2d8148d5..a22df1b35d 100644
--- a/ext/tidy/tidy_arginfo.h
+++ b/ext/tidy/tidy_arginfo.h
@@ -2,7 +2,7 @@
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_tidy_parse_string, 0, 1, tidy, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -16,7 +16,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_tidy_parse_file, 0, 1, tidy, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -27,13 +27,13 @@ ZEND_END_ARG_INFO()
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_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
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_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -91,7 +91,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy___construct, 0, 0, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
@@ -105,26 +105,26 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_parseFile, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_parseString, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_repairString, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_repairFile, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
- ZEND_ARG_INFO(0, config_options)
+ ZEND_ARG_TYPE_MASK(0, config_options, MAY_BE_ARRAY|MAY_BE_STRING)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, use_include_path, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt
index b1f756d17f..be1588c2e4 100644
--- a/sapi/cli/tests/006.phpt
+++ b/sapi/cli/tests/006.phpt
@@ -90,9 +90,9 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Function [ <internal:pcre> function preg_replace ] {
- Parameters [5] {
- Parameter #0 [ <required> $regex ]
- Parameter #1 [ <required> $replace ]
- Parameter #2 [ <required> $subject ]
+ Parameter #0 [ <required> array|string $regex ]
+ Parameter #1 [ <required> array|string $replace ]
+ Parameter #2 [ <required> array|string $subject ]
Parameter #3 [ <optional> int $limit ]
Parameter #4 [ <optional> &$count ]
}
@@ -101,9 +101,9 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Function [ <internal:pcre> function preg_replace_callback ] {
- Parameters [6] {
- Parameter #0 [ <required> $regex ]
+ Parameter #0 [ <required> array|string $regex ]
Parameter #1 [ <required> $callback ]
- Parameter #2 [ <required> $subject ]
+ Parameter #2 [ <required> array|string $subject ]
Parameter #3 [ <optional> int $limit ]
Parameter #4 [ <optional> &$count ]
Parameter #5 [ <optional> int $flags ]
@@ -114,7 +114,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
- Parameters [5] {
Parameter #0 [ <required> array $pattern ]
- Parameter #1 [ <required> $subject ]
+ Parameter #1 [ <required> array|string $subject ]
Parameter #2 [ <optional> int $limit ]
Parameter #3 [ <optional> &$count ]
Parameter #4 [ <optional> int $flags ]
@@ -124,9 +124,9 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
Function [ <internal:pcre> function preg_filter ] {
- Parameters [5] {
- Parameter #0 [ <required> $regex ]
- Parameter #1 [ <required> $replace ]
- Parameter #2 [ <required> $subject ]
+ Parameter #0 [ <required> array|string $regex ]
+ Parameter #1 [ <required> array|string $replace ]
+ Parameter #2 [ <required> array|string $subject ]
Parameter #3 [ <optional> int $limit ]
Parameter #4 [ <optional> &$count ]
}