]> granicus.if.org Git - php/commitdiff
Add a few missing parameter types in stubs
authorMáté Kocsis <kocsismate@woohoolabs.com>
Tue, 28 Jul 2020 21:00:44 +0000 (23:00 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 30 Jul 2020 12:26:45 +0000 (14:26 +0200)
Related to GH-5627

35 files changed:
Zend/tests/argument_restriction_005.phpt
Zend/zend_builtin_functions.stub.php
Zend/zend_builtin_functions_arginfo.h
Zend/zend_closures.stub.php
Zend/zend_closures_arginfo.h
Zend/zend_interfaces.stub.php
Zend/zend_interfaces_arginfo.h
ext/com_dotnet/com_com.c
ext/com_dotnet/com_extension.c
ext/com_dotnet/com_extension.stub.php
ext/com_dotnet/com_extension_arginfo.h
ext/enchant/enchant.stub.php
ext/enchant/enchant_arginfo.h
ext/gd/gd.stub.php
ext/gd/gd_arginfo.h
ext/gmp/gmp.stub.php
ext/gmp/gmp_arginfo.h
ext/hash/hash.stub.php
ext/hash/hash_arginfo.h
ext/intl/php_intl.stub.php
ext/intl/php_intl_arginfo.h
ext/mbstring/mbstring.stub.php
ext/mbstring/mbstring_arginfo.h
ext/mysqli/mysqli.stub.php
ext/mysqli/mysqli_arginfo.h
ext/reflection/php_reflection.c
ext/reflection/php_reflection.stub.php
ext/reflection/php_reflection_arginfo.h
ext/reflection/tests/ReflectionClass_toString_001.phpt
ext/session/session.stub.php
ext/session/session_arginfo.h
ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h
ext/zend_test/test.stub.php
ext/zend_test/test_arginfo.h

index 0982ccde4aa829e08c47407831cac777b9dbf6bd..dc15593013d9764f52d7a86c3048a52d9a1299ff 100644 (file)
@@ -8,4 +8,4 @@ class Sub implements ArrayAccess {
 }
 ?>
 --EXPECTF--
-Fatal error: Declaration of Sub::offsetSet() must be compatible with ArrayAccess::offsetSet($offset, $value) in %sargument_restriction_005.php on line %d
+Fatal error: Declaration of Sub::offsetSet() must be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value) in %sargument_restriction_005.php on line %d
index a9a33d9de145fe2361af420de64f6467bf536fb2..5d5ebcde14a1fe61fe2814f5ea8dbe98755a6338 100644 (file)
@@ -23,7 +23,7 @@ function strncasecmp(string $string1, string $string2, int $length): int {}
 function error_reporting(?int $error_level = null): int {}
 
 /** @param mixed $value */
-function define(string $constant_name, $value, $case_insensitive = false): bool {}
+function define(string $constant_name, $value, bool $case_insensitive = false): bool {}
 
 function defined(string $constant_name): bool {}
 
index 0e1a7c3879e3a1c3aeb0c69d96f1ff49b700adde..4b551e3d59c48398e923448f39b56620300575e0 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: d1ab4864c1159916b45c8f272a2a1d708b2dca65 */
+ * Stub hash: 1f644f72600eddbbb01a4c3912a2c9c5fe12188e */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0)
 ZEND_END_ARG_INFO()
@@ -40,7 +40,7 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_define, 0, 2, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, constant_name, IS_STRING, 0)
        ZEND_ARG_INFO(0, value)
-       ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, "false")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, _IS_BOOL, 0, "false")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_defined, 0, 1, _IS_BOOL, 0)
index 65f5128e6484cba5aeb9ea6442386b028a7980b4..bf71c1b62484c5f8303e94c960cf2fb21d38f9bf 100644 (file)
@@ -17,6 +17,6 @@ final class Closure
 
     public function call(object $newThis, mixed ...$arguments): mixed {}
 
-    /** @param callable $callback Not a proper type annotation due to bug #78770 */
+    /** @param callable $callback callable is not a proper type due to bug #78770. */
     public static function fromCallable($callback): Closure {}
 }
index 9e7e64708ce7bc71782aed4189ad692007338bf9..56d2faec80256ec507ce9695ff60d4f5dc8c3fce 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 57771cb65a3193bd683be75efd04f7daff0f8585 */
+ * Stub hash: 62198e96940fe0e86fe89601015c837aa5390e92 */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0)
 ZEND_END_ARG_INFO()
index e10a343d6ed7cfe4862d61a1a06ade7af7bb62b7..bb94190f8a23a8a55d0f392ab53dc72aa60176e7 100644 (file)
@@ -31,17 +31,19 @@ interface Iterator extends Traversable
 interface ArrayAccess
 {
     /** @return bool */
-    public function offsetExists($offset);
+    public function offsetExists(mixed $offset);
 
-    /* actually this should be return by ref but atm cannot be */
-    /** @return mixed */
-    public function offsetGet($offset);
+    /**
+     * Actually this should be return by ref but atm cannot be.
+     * @return mixed
+     */
+    public function offsetGet(mixed $offset);
 
     /** @return void */
-    public function offsetSet($offset, $value);
+    public function offsetSet(mixed $offset, mixed $value);
 
     /** @return void */
-    public function offsetUnset($offset);
+    public function offsetUnset(mixed $offset);
 }
 
 interface Serializable
index 0598a5cabd9fbe9ea5158033f684208b284d5b02..4b9d30ecd658a9a8c992353a6845148632b4d7c3 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: c3b97b8a9c7522fc5b58e63fbf9cd6a801f4bbc2 */
+ * Stub hash: 1aa9ef81a738328a334176d37683646b60b2f6fa */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IteratorAggregate_getIterator, 0, 0, 0)
 ZEND_END_ARG_INFO()
@@ -15,14 +15,14 @@ ZEND_END_ARG_INFO()
 #define arginfo_class_Iterator_rewind arginfo_class_IteratorAggregate_getIterator
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayAccess_offsetExists, 0, 0, 1)
-       ZEND_ARG_INFO(0, offset)
+       ZEND_ARG_TYPE_INFO(0, offset, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ArrayAccess_offsetGet arginfo_class_ArrayAccess_offsetExists
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayAccess_offsetSet, 0, 0, 2)
-       ZEND_ARG_INFO(0, offset)
-       ZEND_ARG_INFO(0, value)
+       ZEND_ARG_TYPE_INFO(0, offset, IS_MIXED, 0)
+       ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ArrayAccess_offsetUnset arginfo_class_ArrayAccess_offsetExists
index 802717bb9c67ea23d75763d38eae8f77fb254a7f..b024f092f569646e434f43ea8fece978cdf32e60 100644 (file)
@@ -288,18 +288,23 @@ PHP_FUNCTION(com_get_active_object)
        CLSID clsid;
        char *module_name;
        size_t module_name_len;
-       zend_long code_page = COMG(code_page);
+       zend_long code_page;
+       zend_bool code_page_is_null = 1;
        IUnknown *unk = NULL;
        IDispatch *obj = NULL;
        HRESULT res;
        OLECHAR *module = NULL;
 
        php_com_initialize();
-       if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|l",
-                               &module_name, &module_name_len, &code_page)) {
+       if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|l!",
+                               &module_name, &module_name_len, &code_page, &code_page_is_null)) {
                RETURN_THROWS();
        }
 
+       if (code_page_is_null) {
+               code_page = COMG(code_page);
+       }
+
        module = php_com_string_to_olestring(module_name, module_name_len, (int)code_page);
 
        res = CLSIDFromString(module, &clsid);
index a39e792ae9b34bbecf37ee510ea83623ad68dd87..73b70f07ab810d2487f192a054ce666c09434aa6 100644 (file)
@@ -259,6 +259,7 @@ PHP_MINIT_FUNCTION(com_dotnet)
        COM_CONST(VARCMP_EQ);
        COM_CONST(VARCMP_GT);
        COM_CONST(VARCMP_NULL);
+       COM_CONST(LOCALE_SYSTEM_DEFAULT);
 
        COM_CONST(NORM_IGNORECASE);
        COM_CONST(NORM_IGNORENONSPACE);
index d97a51968ecdc63cc1e017c3c932440bbfdcd2ce..90c14df5bc72f0341ea5638b8ab237bbd05ebc54 100644 (file)
@@ -2,52 +2,51 @@
 
 /** @generate-function-entries */
 
-function variant_set(variant $variant, $value): void {}
+function variant_set(variant $variant, mixed $value): void {}
 
-function variant_add($left, $right): variant {}
+function variant_add(mixed $left, mixed $right): variant {}
 
-function variant_cat($left, $right): variant {}
+function variant_cat(mixed $left, mixed $right): variant {}
 
-function variant_sub($left, $right): variant {}
+function variant_sub(mixed $left, mixed $right): variant {}
 
-function variant_mul($left, $right): variant {}
+function variant_mul(mixed $left, mixed $right): variant {}
 
-function variant_and($left, $right): variant {}
+function variant_and(mixed $left, mixed $right): variant {}
 
-function variant_div($left, $right): variant {}
+function variant_div(mixed $left, mixed $right): variant {}
 
-function variant_eqv($left, $right): variant {}
+function variant_eqv(mixed $left, mixed $right): variant {}
 
-function variant_idiv($left, $right): variant {}
+function variant_idiv(mixed $left, mixed $right): variant {}
 
-function variant_imp($left, $right): variant {}
+function variant_imp(mixed $left, mixed $right): variant {}
 
-function variant_mod($left, $right): variant {}
+function variant_mod(mixed $left, mixed $right): variant {}
 
-function variant_or($left, $right): variant {}
+function variant_or(mixed $left, mixed $right): variant {}
 
-function variant_pow($left, $right): variant {}
+function variant_pow(mixed $left, mixed $right): variant {}
 
-function variant_xor($left, $right): variant {}
+function variant_xor(mixed $left, mixed $right): variant {}
 
-function variant_abs($left): variant {}
+function variant_abs(mixed $left): variant {}
 
-function variant_fix($left): variant {}
+function variant_fix(mixed $left): variant {}
 
-function variant_int($left): variant {}
+function variant_int(mixed $left): variant {}
 
-function variant_neg($left): variant {}
+function variant_neg(mixed $left): variant {}
 
-function variant_not($left): variant {}
+function variant_not(mixed $left): variant {}
 
-function variant_round($left, int $decimals): ?variant {}
+function variant_round(mixed $left, int $decimals): ?variant {}
 
-function variant_cmp($left, $right, int $lcid = UNKNOWN, int $flags = 0): int {}
+function variant_cmp(mixed $left, mixed $right, int $lcid = LOCALE_SYSTEM_DEFAULT, int $flags = 0): int {}
 
 function variant_date_to_timestamp(variant $variant): ?int {}
 
-/** @return variant|false */
-function variant_date_from_timestamp(int $timestamp) {}
+function variant_date_from_timestamp(int $timestamp): variant|false {}
 
 function variant_get_type(variant $variant): int {}
 
@@ -55,10 +54,11 @@ function variant_set_type(variant $variant, int $type): void {}
 
 function variant_cast(variant $variant, int $type): variant {}
 
-function com_get_active_object(string $progid, int $code_page = UNKNOWN): variant {}
+function com_get_active_object(string $progid, ?int $code_page = null): variant {}
 
 function com_create_guid(): string|false {}
 
+/** @param array|string|null $sinkinterface */
 function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = UNKNOWN): bool {}
 
 function com_print_typeinfo($comobject, ?string $dispinterface = null, bool $wantsink = false): bool {}
@@ -69,7 +69,7 @@ function com_load_typelib(string $typelib_name, bool $case_insensitive = true):
 
 class variant
 {
-    public function __construct($value = null, int $type = VT_EMPTY, int $codepage = CP_ACP) {}
+    public function __construct(mixed $value = null, int $type = VT_EMPTY, int $codepage = CP_ACP) {}
 }
 
 class com
index 4ee6d3750469b0496e3381b95c5868d17c4dd0f5..afe2f1b6add27a2c69b672c6176caa13687e7cd1 100644 (file)
@@ -1,14 +1,14 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 965dcbb494d51bb3fd41a2898a1c53d7478fd699 */
+ * Stub hash: caec4bba1103a07a86803ac0192782fef7d6680f */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set, 0, 2, IS_VOID, 0)
        ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
-       ZEND_ARG_INFO(0, value)
+       ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_add, 0, 2, variant, 0)
-       ZEND_ARG_INFO(0, left)
-       ZEND_ARG_INFO(0, right)
+       ZEND_ARG_TYPE_INFO(0, left, IS_MIXED, 0)
+       ZEND_ARG_TYPE_INFO(0, right, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_variant_cat arginfo_variant_add
@@ -36,7 +36,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_variant_xor arginfo_variant_add
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_abs, 0, 1, variant, 0)
-       ZEND_ARG_INFO(0, left)
+       ZEND_ARG_TYPE_INFO(0, left, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_variant_fix arginfo_variant_abs
@@ -48,14 +48,14 @@ ZEND_END_ARG_INFO()
 #define arginfo_variant_not arginfo_variant_abs
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_round, 0, 2, variant, 1)
-       ZEND_ARG_INFO(0, left)
+       ZEND_ARG_TYPE_INFO(0, left, IS_MIXED, 0)
        ZEND_ARG_TYPE_INFO(0, decimals, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_cmp, 0, 2, IS_LONG, 0)
-       ZEND_ARG_INFO(0, left)
-       ZEND_ARG_INFO(0, right)
-       ZEND_ARG_TYPE_INFO(0, lcid, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO(0, left, IS_MIXED, 0)
+       ZEND_ARG_TYPE_INFO(0, right, IS_MIXED, 0)
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, lcid, IS_LONG, 0, "LOCALE_SYSTEM_DEFAULT")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
 
@@ -63,7 +63,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_date_to_timestamp, 0, 1,
        ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_date_from_timestamp, 0, 0, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_variant_date_from_timestamp, 0, 1, variant, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 
@@ -83,7 +83,7 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_com_get_active_object, 0, 1, variant, 0)
        ZEND_ARG_TYPE_INFO(0, progid, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, code_page, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code_page, IS_LONG, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_com_create_guid, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
@@ -111,7 +111,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_load_typelib, 0, 1, _IS_BOOL
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_variant___construct, 0, 0, 0)
-       ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, value, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_MIXED, 0, "null")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "VT_EMPTY")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, codepage, IS_LONG, 0, "CP_ACP")
 ZEND_END_ARG_INFO()
index 457e55e64bcc35e7c89c2cc3c40355ac498803aa..e39f3cd041b29c67a6cd39d5cb388200ed5d755e 100644 (file)
@@ -38,6 +38,7 @@ function enchant_broker_set_ordering(EnchantBroker $broker, string $tag, string
 
 function enchant_broker_describe(EnchantBroker $broker): array {}
 
+/** @param array $suggestions */
 function enchant_dict_quick_check(EnchantDictionary $dict, string $word, &$suggestions = null): bool {}
 
 function enchant_dict_check(EnchantDictionary $dict, string $word): bool {}
index adbbc3779fda4b54bbf3ca67b58ad7bf3537d6b4..94fdb781a4512dbe075b6650c5377f6663b3baab 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 5a67e10da7a70552110e807118a33d1d7bb028da */
+ * Stub hash: 22c47f0b30f6952a42546c403fbd2e92836661fa */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
 ZEND_END_ARG_INFO()
index 22f2c4f256f446d8d73f37a302bd2a3cd695ee50..deef81f7f94e5096a52271d14ae95a935d373920 100644 (file)
@@ -123,9 +123,9 @@ function imagejpeg(GdImage $im, $to = null, int $quality = -1): bool {}
 /** @param resource|string|null $to */
 function imagewbmp(GdImage $im, $to = null, ?int $foreground = null): bool {}
 
-function imagegd(GdImage $im, $to = UNKNOWN): bool {}
+function imagegd(GdImage $im, string $to = UNKNOWN): bool {}
 
-function imagegd2(GdImage $im, $to = UNKNOWN, int $chunk_size = UNKNOWN, int $type = UNKNOWN): bool {}
+function imagegd2(GdImage $im, string $to = UNKNOWN, int $chunk_size = UNKNOWN, int $type = UNKNOWN): bool {}
 
 #ifdef HAVE_GD_BMP
 /** @param resource|string|null $to */
index 371c3e2ecbc79d94539d8730c8b23607ef9809c7..c489fc0c3cf4edfd776c93f108b81f7aedb02697 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 14cd8fc3865f7ef2b88c4834fbf33d360b302794 */
+ * Stub hash: a792b0c5497013c85cca83c4baab928a5191f3b9 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
 ZEND_END_ARG_INFO()
@@ -241,12 +241,12 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegd, 0, 1, _IS_BOOL, 0)
        ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
-       ZEND_ARG_INFO(0, to)
+       ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegd2, 0, 1, _IS_BOOL, 0)
        ZEND_ARG_OBJ_INFO(0, im, GdImage, 0)
-       ZEND_ARG_INFO(0, to)
+       ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, chunk_size, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
 ZEND_END_ARG_INFO()
index bfa4ba93ee155e4ad2032041d6d439f6e702a432..d7d6b5766799120853432770004123897fbdd78c 100644 (file)
@@ -90,26 +90,26 @@ function gmp_sqrt($a): GMP|false {}
 /** @param GMP|int|bool|string $a */
 function gmp_sqrtrem($a): array|false {}
 
-/** @param GMP|int|bool|string $a **/
+/** @param GMP|int|bool|string $a */
 function gmp_root($a, int $nth): GMP|false {}
 
-/** @param GMP|int|bool|string $a **/
+/** @param GMP|int|bool|string $a */
 function gmp_rootrem($a, int $nth): array|false {}
 
-/** @param GMP|int|bool|string $base **/
+/** @param GMP|int|bool|string $base */
 function gmp_pow($base, int $exp): GMP|false {}
 
 /**
  * @param GMP|int|bool|string $base
  * @param GMP|int|bool|string $exp
  * @param GMP|int|bool|string $mod
- **/
+ */
 function gmp_powm($base, $exp, $mod): GMP|false {}
 
-/** @param GMP|int|bool|string $a **/
+/** @param GMP|int|bool|string $a */
 function gmp_perfect_square($a): bool {}
 
-/** @param GMP|int|bool|string $a **/
+/** @param GMP|int|bool|string $a */
 function gmp_perfect_power($a): bool {}
 
 /** @param GMP|int|bool|string $a */
index 5208204241496bb203cb30b7f124c2eee03c3412..1c5903bb96d91b8c14d1f61dc4cb06a890c0f98f 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 3f96612dbbeac0ae619461e400e91b3a15e0cd9c */
+ * Stub hash: 4b5e54ee34a3cb6471d5a3c30c50e218a80347c0 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_init, 0, 1, GMP, MAY_BE_FALSE)
        ZEND_ARG_INFO(0, number)
index f8788ed61ed51b2cae47c475ab510f2c8d7325f0..6a660aeaef6027783847d3f66b3ab1a946b385dd 100644 (file)
@@ -30,10 +30,6 @@ function hash_hmac_algos(): array {}
 
 function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $raw_output = false): string {}
 
-/**
- * @param $known_string no type juggling is performed
- * @param $user_string no type juggling is performed
- */
 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 {}
index c877c88e5cb93e54df334c729d2b53a9070d8be4..b51be84792ea05d3c2ea51547cb42322e9d04952 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: d4caa0bf70c25a8436049197e822a6c85e4e4643 */
+ * Stub hash: 6da0ff3370cecc919fccf7c6791828a81b44156d */
 
 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)
index 9708f6d35973bc9044af2917807889a5b2ee795c..aa86364e60c6c76cf2f2a3b4dac5bd19eefb6273 100644 (file)
@@ -366,6 +366,7 @@ function intltz_create_time_zone_id_enumeration(int $zoneType, ?string $region =
 
 function intltz_from_date_time_zone(DateTimeZone $zone): ?IntlTimeZone {}
 
+/** @param bool $isSystemID */
 function intltz_get_canonical_id(string $zoneId, &$isSystemID = null): string|false {}
 
 function intltz_get_display_name(IntlTimeZone $tz, bool $isDaylight = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {}
@@ -414,7 +415,7 @@ function transliterator_list_ids(): array|false {}
 
 function transliterator_create_inverse(Transliterator $orig_trans): ?Transliterator {}
 
-/** @param Transliterator|string */
+/** @param Transliterator|string $transliterator */
 function transliterator_transliterate($transliterator, string $subject, int $start = 0, int $end = -1): string|false {}
 
 function transliterator_get_error_code(Transliterator $trans): int|false {}
index f9e2cbd1520097949f5b0d994edc081ec329aa3b..463c36c7b2629a6dc164e62fb170a8b223dd7bdc 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 6130944985187815dd839f7425213f91c3261735 */
+ * Stub hash: a90502c989d9c9b41753def3e00b953e0cbe660d */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1)
        ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timeZone, "null")
index 6bd6aeae6fe6d34069443454b964c8f648dbef03..343a5d103d136d48449c291d57d13b27686d159a 100644 (file)
@@ -16,6 +16,7 @@ function mb_substitute_character(string|int|null $substitute_character = null):
 
 function mb_preferred_mime_name(string $encoding): string|false {}
 
+/** @param array $result */
 function mb_parse_str(string $encoded_string, &$result): bool {}
 
 function mb_output_handler(string $contents, int $status): string {}
@@ -70,7 +71,7 @@ function mb_decode_mimeheader(string $string): string {}
 
 function mb_convert_kana(string $str, string $option = "KV", ?string $encoding = null): string {}
 
-function mb_convert_variables(string $to, array|string $from, &$var, &...$vars): string|false {}
+function mb_convert_variables(string $to, array|string $from, mixed &$var, mixed &...$vars): string|false {}
 
 function mb_encode_numericentity(string $string, array $convmap, ?string $encoding = null, bool $is_hex = false): string {}
 
@@ -92,8 +93,10 @@ function mb_chr(int $cp, ?string $encoding = null): string|false {}
 #ifdef HAVE_MBREGEX
 function mb_regex_encoding(?string $encoding = null): string|bool {}
 
+/** @param array $registers */
 function mb_ereg(string $pattern, string $string, &$registers = null): int|false {}
 
+/** @param array $registers */
 function mb_eregi(string $pattern, string $string, &$registers = null): int|false {}
 
 function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $option = null): string|false|null {}
index 66fb381ed4f44b5b5a371bc2228c4177dc001af6..7267b943ef06e1683928cb361203c815970ae17f 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 282413dbcb1b92e1efadf4352f443692076aea59 */
+ * Stub hash: 5ad8a8cf20eeae59713d19135ecccbee243754eb */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null")
@@ -157,8 +157,8 @@ 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_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
-       ZEND_ARG_INFO(1, var)
-       ZEND_ARG_VARIADIC_INFO(1, vars)
+       ZEND_ARG_TYPE_INFO(1, var, IS_MIXED, 0)
+       ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_numericentity, 0, 2, IS_STRING, 0)
index 5e73f34fa0aeea20cdce46e6850f27b4e57049c0..84d95b24d7012c261949a019098f40ac9dd2f37f 100644 (file)
@@ -238,14 +238,14 @@ class mysqli
     public function set_charset(string $charset) {}
 
     /**
-     * @param mixed $value
+     * @param string|int $value
      * @return bool
      * @alias mysqli_options
      */
     public function options(int $option, $value) {}
 
     /**
-     * @param mixed $value
+     * @param string|int $value
      * @return bool
      * @alias mysqli_options
      */
@@ -633,7 +633,7 @@ function mysqli_num_fields(mysqli_result $mysql_result): int {}
 
 function mysqli_num_rows(mysqli_result $mysqli_result): int|string {}
 
-/** @param mixed $value */
+/** @param string|int $value */
 function mysqli_options(mysqli $mysqli_link, int $option, $value): bool {}
 
 function mysqli_ping(mysqli $mysqli_link): bool {}
@@ -681,8 +681,7 @@ function mysqli_stmt_attr_set(mysqli_stmt $mysql_stmt, int $attr, int $mode_in):
 
 function mysqli_stmt_bind_param(mysqli_stmt $mysql_stmt, string $types, mixed &...$vars): bool {}
 
-/** @param mixed &...$vars */
-function mysqli_stmt_bind_result(mysqli_stmt $mysql_stmt, &...$vars): bool {}
+function mysqli_stmt_bind_result(mysqli_stmt $mysql_stmt, mixed &...$vars): bool {}
 
 function mysqli_stmt_close(mysqli_stmt $mysql_stmt): bool {}
 
@@ -757,7 +756,7 @@ function mysqli_refresh(mysqli $mysqli_link, int $options): bool {}
 function mysqli_escape_string(mysqli $mysqli_link, string $string_to_escape): string {}
 
 /**
- * @param mixed $value
+ * @param string|int $value
  * @alias mysqli_options
  */
 function mysqli_set_opt(mysqli $mysqli_link, int $option, $value): bool {}
index 3b2b995dc537b42e0c964a760ce3fab34b9256ec..28145d146089fd7fcdb34fb4c3a9873b221478b4 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: cde1bbb449c6adae7a99c7df3e9d290d501e18be */
+ * Stub hash: 0fb73727b9ca9f4fa9827fecd948b60948ddc423 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
        ZEND_ARG_OBJ_INFO(0, mysql_link, mysqli, 0)
@@ -304,7 +304,7 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_bind_result, 0, 1, _IS_BOOL, 0)
        ZEND_ARG_OBJ_INFO(0, mysql_stmt, mysqli_stmt, 0)
-       ZEND_ARG_VARIADIC_INFO(1, vars)
+       ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_mysqli_stmt_close arginfo_mysqli_stmt_execute
index 5172b928e37d56227c7934f7ff60649f5c427d7e..1d6d6b7a8d0c1ae709eee7652ea1a03e948e227f 100644 (file)
@@ -3089,16 +3089,20 @@ ZEND_METHOD(ReflectionMethod, __toString)
 ZEND_METHOD(ReflectionMethod, getClosure)
 {
        reflection_object *intern;
-       zval *obj;
+       zval *obj = NULL;
        zend_function *mptr;
 
+       if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &obj) == FAILURE) {
+               RETURN_THROWS();
+       }
+
        GET_REFLECTION_OBJECT_PTR(mptr);
 
        if (mptr->common.fn_flags & ZEND_ACC_STATIC)  {
                zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
        } else {
-               if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
-                       RETURN_THROWS();
+               if (!obj) {
+                       zend_argument_value_error(1, "cannot be null for non-static methods");
                }
 
                if (!instanceof_function(Z_OBJCE_P(obj), mptr->common.scope)) {
index 58da7ebeee0f4c0bbc2dde73b274ba8f34395d32..539520597f0b9ef06950bae3e234659f99df9f33 100644 (file)
@@ -177,7 +177,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract
     public function isDestructor() {}
 
     /** @return Closure */
-    public function getClosure($object = UNKNOWN) {}
+    public function getClosure(?object $object = null) {}
 
     /** @return int */
     public function getModifiers() {}
@@ -325,10 +325,10 @@ class ReflectionClass implements Reflector
     public function getStaticProperties() {}
 
     /** @return mixed */
-    public function getStaticPropertyValue(string $name, $default = UNKNOWN) {}
+    public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN) {}
 
     /** @return void */
-    public function setStaticPropertyValue(string $name, $value) {}
+    public function setStaticPropertyValue(string $name, mixed $value) {}
 
     /** @return array */
     public function getDefaultProperties() {}
@@ -385,7 +385,7 @@ class ReflectionProperty implements Reflector
     public function getValue(?object $object = null) {}
 
     /** @return void */
-    public function setValue($objectOrValue, $value = UNKNOWN) {}
+    public function setValue(mixed $objectOrValue, mixed $value = UNKNOWN) {}
 
     /** @return bool */
     public function isInitialized(?object $object = null) {}
index 27125fc815b99c93170ea2fdd9a1bae3fae4bd99..00013c7a507e657ecd52f0dcd9a7a08933b8b1f2 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 0a3d9fb707ddf5e508075799bf06ff42b849a4b8 */
+ * Stub hash: beaf79270ab56d2e87a301a4a5d4444b2cc520d8 */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1)
        ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0)
@@ -124,7 +124,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_class_ReflectionMethod_isDestructor arginfo_class_ReflectionFunctionAbstract___clone
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_getClosure, 0, 0, 0)
-       ZEND_ARG_INFO(0, object)
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, object, IS_OBJECT, 1, "null")
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ReflectionMethod_getModifiers arginfo_class_ReflectionFunctionAbstract___clone
@@ -247,12 +247,12 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_getStaticPropertyValue, 0, 0, 1)
        ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
-       ZEND_ARG_INFO(0, default)
+       ZEND_ARG_TYPE_INFO(0, default, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionClass_setStaticPropertyValue, 0, 0, 2)
        ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
-       ZEND_ARG_INFO(0, value)
+       ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ReflectionClass_getDefaultProperties arginfo_class_ReflectionFunctionAbstract___clone
@@ -292,16 +292,14 @@ ZEND_END_ARG_INFO()
 
 #define arginfo_class_ReflectionProperty_getName arginfo_class_ReflectionFunctionAbstract___clone
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty_getValue, 0, 0, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, object, IS_OBJECT, 1, "null")
-ZEND_END_ARG_INFO()
+#define arginfo_class_ReflectionProperty_getValue arginfo_class_ReflectionMethod_getClosure
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionProperty_setValue, 0, 0, 1)
-       ZEND_ARG_INFO(0, objectOrValue)
-       ZEND_ARG_INFO(0, value)
+       ZEND_ARG_TYPE_INFO(0, objectOrValue, IS_MIXED, 0)
+       ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
 ZEND_END_ARG_INFO()
 
-#define arginfo_class_ReflectionProperty_isInitialized arginfo_class_ReflectionProperty_getValue
+#define arginfo_class_ReflectionProperty_isInitialized arginfo_class_ReflectionMethod_getClosure
 
 #define arginfo_class_ReflectionProperty_isPublic arginfo_class_ReflectionFunctionAbstract___clone
 
index 932d40f495fd88e9efa3a4d88e6af3940c89053d..bb9ead8ce35198be7b81121042d644e2cced5734 100644 (file)
@@ -301,7 +301,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector, String
 
       - Parameters [2] {
         Parameter #0 [ <required> string $name ]
-        Parameter #1 [ <optional> $default = <default> ]
+        Parameter #1 [ <optional> mixed $default = <default> ]
       }
     }
 
@@ -309,7 +309,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector, String
 
       - Parameters [2] {
         Parameter #0 [ <required> string $name ]
-        Parameter #1 [ <required> $value ]
+        Parameter #1 [ <required> mixed $value ]
       }
     }
 
index 336a35b7310e353727d06c71b3d1523e5546c6e8..e70669d5a8819864eb1232762d3772738595ffc1 100644 (file)
@@ -39,12 +39,24 @@ function session_register_shutdown(): void {}
 /** @alias session_write_close */
 function session_commit(): bool {}
 
+/**
+ * @param callable|object $open
+ * @param callable|bool $close
+ * @param callable $read
+ * @param callable $write
+ * @param callable $destroy
+ * @param callable $gc
+ * @param callable $create_sid
+ * @param callable $validate_sid
+ * @param callable $update_timestamp
+ */
 function session_set_save_handler($open, $close = UNKNOWN, $read = UNKNOWN, $write = UNKNOWN, $destroy = UNKNOWN, $gc = UNKNOWN, $create_sid = UNKNOWN, $validate_sid = UNKNOWN, $update_timestamp = UNKNOWN): bool {}
 
 function session_cache_limiter(?string $cache_limiter = null): string|false {}
 
 function session_cache_expire(?int $new_cache_expire = null): int|false {}
 
+/** @param int|array $lifetime_or_options */
 function session_set_cookie_params($lifetime_or_options, string $path = UNKNOWN, string $domain  = "", ?bool $secure = null, ?bool $httponly = null): bool {}
 
 function session_start(array $options = []): bool {}
index 10556941acbc8176c194f020a3c83ded640d9b73..622eb4cfb52a393626f37fe0f88e9c9ea5b9d6c1 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: c026a3449eacd0873d72423483d375d40105e9a0 */
+ * Stub hash: 9e4a4b1d719197772b283abfb1e515180d7b8bb0 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null")
index 7fbb4b0960600c74e882abc67a63f52af497398c..31161cdf03fb608ebfaebeee5887170e425d4939 100755 (executable)
@@ -1337,7 +1337,7 @@ function gettype(mixed $var): string {}
 
 function get_debug_type(mixed $var): string {}
 
-function settype(&$var, string $type): bool {}
+function settype(mixed &$var, string $type): bool {}
 
 function intval(mixed $value, int $base = 10): int {}
 
@@ -1379,6 +1379,7 @@ function is_object(mixed $value): bool {}
 
 function is_scalar(mixed $value): bool {}
 
+/** @param string $callable_name */
 function is_callable(mixed $value, bool $syntax_only = false, &$callable_name = null): bool {}
 
 function is_iterable(mixed $value): bool {}
index eb26e1d86a022a9d26bca8e19f79515d9c649025..9eb97f1df326b909557bd42dc536b02d2e8f45ba 100755 (executable)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 22afbf7f01658785162ad9c82e09f1f11d3fb13a */
+ * Stub hash: ced7e5bc2c202a0678a5616bc1ffd2ef0df66723 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -2057,7 +2057,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_get_debug_type arginfo_gettype
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_settype, 0, 2, _IS_BOOL, 0)
-       ZEND_ARG_INFO(1, var)
+       ZEND_ARG_TYPE_INFO(1, var, IS_MIXED, 0)
        ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
index be8402aab72ca7c2ecfa164d6587baac3434eca1..cc4a561f542371aeba9ad149fa715f0a1880f30b 100644 (file)
@@ -20,7 +20,7 @@ function zend_test_nullable_array_return(): ?array {}
 function zend_test_void_return(): void {}
 
 /** @deprecated */
-function zend_test_deprecated($arg = UNKNOWN): void {}
+function zend_test_deprecated(mixed $arg = null): void {}
 
 function zend_create_unterminated_string(string $str): string {}
 
index b406edf24f83dabb7b1b51d615d9184e831f04de..ae7cd77b587c8c40add3a57ae94a10ebaa5ee34a 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: d2f58424106d78e0bb3b363c34fa94472b5e758d */
+ * Stub hash: 82fd97d4985448884141842955a4bee2c90ba338 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
 ZEND_END_ARG_INFO()
@@ -11,7 +11,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_void_return, 0, 0, IS_
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_deprecated, 0, 0, IS_VOID, 0)
-       ZEND_ARG_INFO(0, arg)
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg, IS_MIXED, 0, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, 0, 1, IS_STRING, 0)