diff --git a/src/Type/ErrorType.php b/src/Type/ErrorType.php index 1fafe7c34df..91bcc3cf13e 100644 --- a/src/Type/ErrorType.php +++ b/src/Type/ErrorType.php @@ -3,16 +3,20 @@ namespace PHPStan\Type; use PHPStan\Turbo\ShadowedByTurboExtension; +use function sprintf; /** @api */ #[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/ErrorType.cpp')] class ErrorType extends MixedType { - /** @api */ - public function __construct(private ?string $reason = null) + /** + * @api + * @param Type|null $witnessType What some path is known to produce, see MixedType::__construct(). + */ + public function __construct(private ?string $reason = null, ?Type $witnessType = null) { - parent::__construct(); + parent::__construct(witnessType: $witnessType); } public function getReason(): ?string @@ -25,10 +29,24 @@ public function describe(VerbosityLevel $level): string return $level->handle( fn (): string => parent::describe($level), fn (): string => parent::describe($level), - static fn (): string => '*ERROR*', + fn (): string => '*ERROR*' . $this->describeWitnessType($level), ); } + private function describeWitnessType(VerbosityLevel $level): string + { + $witnessType = $this->getWitnessType(); + if ($witnessType === null) { + return ''; + } + + if ($witnessType instanceof UnionType) { + return sprintf('+(%s)', $witnessType->describe($level)); + } + + return sprintf('+%s', $witnessType->describe($level)); + } + public function getIterableKeyType(): Type { return new ErrorType(); @@ -41,12 +59,30 @@ public function getIterableValueType(): Type public function subtract(Type $type): Type { - return new self(); + $witnessType = $this->getWitnessType(); + + return $this->recreate(false, null, $witnessType !== null ? TypeCombinator::remove($witnessType, $type) : null); } public function equals(Type $type): bool { - return $type instanceof self; + if (!$type instanceof self) { + return false; + } + + $witnessType = $this->getWitnessType(); + $otherWitnessType = $type->getWitnessType(); + if ($witnessType === null || $otherWitnessType === null) { + return $witnessType === $otherWitnessType; + } + + return $witnessType->equals($otherWitnessType); + } + + /** An error has nothing subtracted and is not an explicit mixed. */ + protected function recreate(bool $isExplicitMixed, ?Type $subtractedType, ?Type $witnessType): MixedType + { + return new self($this->reason, $witnessType); } public function toNativePhpTypeNode(NativeTypePosition $position) diff --git a/src/Type/MixedType.php b/src/Type/MixedType.php index 36f6bfbaf26..6ec9255d4f1 100644 --- a/src/Type/MixedType.php +++ b/src/Type/MixedType.php @@ -902,7 +902,7 @@ public function subtract(Type $type): Type $type = TypeCombinator::union($this->subtractedType, $type); } - return new self($this->isExplicitMixed, $type, $witnessType); + return $this->recreate($this->isExplicitMixed, $type, $witnessType); } public function getTypeWithoutSubtractedType(): Type @@ -912,7 +912,7 @@ public function getTypeWithoutSubtractedType(): Type public function changeSubtractedType(?Type $subtractedType): Type { - return new self($this->isExplicitMixed, $subtractedType, $this->witnessType); + return $this->recreate($this->isExplicitMixed, $subtractedType, $this->witnessType); } /** @@ -938,7 +938,13 @@ public function getWitnessType(): ?Type public function changeWitnessType(?Type $witnessType): self { - return new self($this->isExplicitMixed, $this->subtractedType, $witnessType); + return $this->recreate($this->isExplicitMixed, $this->subtractedType, $witnessType); + } + + /** A copy of this type with these parts, which a subclass that is a mixed of its own kind keeps its kind in. */ + protected function recreate(bool $isExplicitMixed, ?Type $subtractedType, ?Type $witnessType): self + { + return new self($isExplicitMixed, $subtractedType, $witnessType); } public function getSubtractedType(): ?Type @@ -957,7 +963,7 @@ public function traverse(callable $cb): Type return $this; } - return new self($this->isExplicitMixed, $this->subtractedType, $witnessType); + return $this->recreate($this->isExplicitMixed, $this->subtractedType, $witnessType); } public function traverseSimultaneously(Type $right, callable $cb): Type diff --git a/src/Type/TypeCombinator.php b/src/Type/TypeCombinator.php index a77899d36e9..e13f525974b 100644 --- a/src/Type/TypeCombinator.php +++ b/src/Type/TypeCombinator.php @@ -320,13 +320,19 @@ public static function union(Type ...$types): Type public static function joinValues(Type ...$types): Type { $union = self::union(...$types); - if (get_class($union) !== MixedType::class || count($types) < 2) { + if (!$union instanceof MixedType || !self::holdsWitnessType($union) || count($types) < 2) { return $union; } return self::witnessAbsorbedTypes($union, ...$types); } + /** A plain mixed or error keeps a witness type; a template or another mixed of its own kind does not. */ + private static function holdsWitnessType(Type $type): bool + { + return get_class($type) === MixedType::class || get_class($type) === ErrorType::class; + } + /** * A mixed that absorbed other members keeps them as its witness type, so a * path known to produce a value of the wrong type is still reported where @@ -344,7 +350,7 @@ public static function witnessAbsorbedTypes(MixedType $union, Type ...$types): M foreach ($types as $type) { $members = $type instanceof UnionType && !$type instanceof TemplateType ? $type->getTypes() : [$type]; foreach ($members as $member) { - if (get_class($member) === MixedType::class) { + if ($member instanceof MixedType && self::holdsWitnessType($member)) { $witnessType = $member->getWitnessType(); if ($witnessType !== null) { $witnessTypes[] = $witnessType; @@ -364,7 +370,7 @@ public static function witnessAbsorbedTypes(MixedType $union, Type ...$types): M $witnessType = $witnessTypes === [] ? null : TypeTraverser::map( self::union(...$witnessTypes), static function (Type $type, callable $traverse): Type { - if (get_class($type) === MixedType::class && $type->getWitnessType() !== null) { + if ($type instanceof MixedType && self::holdsWitnessType($type) && $type->getWitnessType() !== null) { return $type->changeWitnessType(null); } diff --git a/tests/PHPStan/Analyser/nsrt/error-type-witness.php b/tests/PHPStan/Analyser/nsrt/error-type-witness.php new file mode 100644 index 00000000000..0930cba0943 --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/error-type-witness.php @@ -0,0 +1,31 @@ +checkMixedWitnessTypes = true; + $this->analyse([__DIR__ . '/../../Analyser/nsrt/error-type-witness.php'], [ + [ + 'Parameter #1 $string of function strlen expects string, int given.', + 15, + ], + [ + 'Parameter #1 $string of function strlen expects string, array given.', + 26, + ], + ]); + } + public function testRecursiveTypes(): void { $this->analyse([__DIR__ . '/data/recursive-types.php'], [ diff --git a/turbo-ext/src/ErrorType.cpp b/turbo-ext/src/ErrorType.cpp index e21ba441c84..452192a6bf2 100644 --- a/turbo-ext/src/ErrorType.cpp +++ b/turbo-ext/src/ErrorType.cpp @@ -8,7 +8,7 @@ * following MixedType's two; its constructor calls parent::__construct(), * which goes to MixedType's constructor body directly. * - * `self` in the twin (subtract(), equals()) is ErrorType itself, never + * `self` in the twin (recreate(), equals()) is ErrorType itself, never * `static` — the native bodies hold the class entry the same way. The one * `parent::` call (describe()) goes to MixedType's native body run on the * object, so a subclass overriding describeSubtractedType() is still @@ -23,6 +23,8 @@ namespace sigs = ptdecl::ErrorType::sig; zend_class_entry *pt_ce_error_type = nullptr; +static void ZEND_FASTCALL etRecreate(INTERNAL_FUNCTION_PARAMETERS); + namespace phpstanturbo { /* Mirrors PHPStan\Type\ErrorType. State lives in the PHP object's $reason @@ -32,10 +34,11 @@ class ErrorType public: explicit ErrorType(zend_object *self) : self(self) {} - /* __construct(private ?string $reason = null) { parent::__construct(); }: - * the promoted property first (as the engine assigns it), then - * MixedType's constructor body; $reason borrowed, NULL for null */ - void construct(zend_string *reason) + /* __construct(private ?string $reason = null, ?Type $witnessType = null) + * { parent::__construct(witnessType: $witnessType); }: the promoted + * property first (as the engine assigns it), then MixedType's + * constructor body; both borrowed, NULL for null */ + void construct(zend_string *reason, zval *witnessType = NULL) { zval *reasonSlot = OBJ_PROP_NUM(self, slots::reason); /* the slot is overwritten in place: a repeated __construct() call @@ -51,16 +54,16 @@ class ErrorType if (Z_TYPE(previous) != IS_UNDEF) { zval_ptr_dtor(&previous); } - pt_mixed_type_construct(self, false, NULL); + pt_mixed_type_construct(self, false, NULL, witnessType); } /* new ErrorType() / new self() — exactly the class, as the twin's sites * spell it; UNDEF = pending exception */ - static zv::Val create(zend_string *reason = NULL) + static zv::Val create(zend_string *reason = NULL, zval *witnessType = NULL) { zval object; if (UNEXPECTED(object_init_ex(&object, pt_ce_error_type) != SUCCESS)) return zv::Val(); - ErrorType(Z_OBJ(object)).construct(reason); + ErrorType(Z_OBJ(object)).construct(reason, witnessType); return zv::Val::adopt(object); } @@ -79,14 +82,32 @@ class ErrorType } /* $level->handle(): parent::describe($level) for the type-only and - * value levels, '*ERROR*' for the precise level and (no cache callback - * given) the cache level; UNDEF = pending exception */ + * value levels, '*ERROR*' . $this->describeWitnessType($level) for the + * precise level and (no cache callback given) the cache level; UNDEF = + * pending exception */ zv::Val describe(zval *level) const { pt_verbosity_case which; if (UNEXPECTED(!pt_type_verbosity_case(level, which))) return zv::Val(); if (which == PT_VERBOSITY_TYPE_ONLY || which == PT_VERBOSITY_VALUE) return pt_mixed_type_describe(self, level); - return zv::Val::string("*ERROR*", sizeof("*ERROR*") - 1); + zval *witness = pt_mixed_type_witness(self); + if (UNEXPECTED(witness == NULL)) return zv::Val(); + if (Z_TYPE_P(witness) == IS_NULL) return zv::Val::string("*ERROR*", sizeof("*ERROR*") - 1); + /* sprintf('+(%s)', ...) for a UnionType witness, sprintf('+%s', ...) otherwise */ + zv::Val witnessDescription = pt_type_call(Z_OBJ_P(witness), PT_LC("describe"), 1, level); + if (UNEXPECTED(witnessDescription.isUndef() || !zv::Ref(witnessDescription.raw()).isString())) { + if (!EG(exception)) zend_type_error("phpstan_turbo: describe() must return string"); + return zv::Val(); + } + bool parenthesized = instanceof_function(Z_OBJCE_P(witness), pt_ce_union_type); + smart_str description = {NULL, 0}; + smart_str_appendl(&description, parenthesized ? "*ERROR*+(" : "*ERROR*+", parenthesized ? 9 : 8); + smart_str_append(&description, zv::Ref(witnessDescription.raw()).asString()); + if (parenthesized) smart_str_appendc(&description, ')'); + smart_str_0(&description); + zval result; + ZVAL_STR(&result, description.s); + return zv::Val::adopt(result); } /* new ErrorType() */ @@ -95,11 +116,45 @@ class ErrorType /* new ErrorType() */ static zv::Val getIterableValueType() { return create(); } - /* new self() */ - static zv::Val subtract() { return create(); } + /* $this->recreate(false, null, $witnessType !== null ? + * TypeCombinator::remove($witnessType, $type) : null); UNDEF = pending + * exception */ + zv::Val subtract(zval *type) const + { + zval *witness = pt_mixed_type_witness(self); + if (UNEXPECTED(witness == NULL)) return zv::Val(); + zv::Val remainingWitness; + if (Z_TYPE_P(witness) != IS_NULL) { + remainingWitness = pt_type_combinator_remove(witness, type); + if (UNEXPECTED(remainingWitness.isUndef())) return zv::Val(); + } + zval *remaining = remainingWitness.isUndef() ? NULL : remainingWitness.raw(); + if (EXPECTED(pt_type_method_is(self, PT_LC("recreate"), etRecreate))) return recreate(remaining); + zval args[3]; + ZVAL_FALSE(&args[0]); + ZVAL_NULL(&args[1]); + if (remaining == NULL) ZVAL_NULL(&args[2]); else ZVAL_COPY_VALUE(&args[2], remaining); + return pt_type_call(self, PT_LC("recreate"), 3, args); + } - /* $type instanceof self */ - static bool equals(zval *type) { return instanceof_function(Z_OBJCE_P(type), pt_ce_error_type); } + /* $type instanceof self, with equal witnesses (both null or equals()); + * false with an exception pending */ + [[nodiscard]] bool equals(zval *type, bool &out) const + { + out = false; + if (!instanceof_function(Z_OBJCE_P(type), pt_ce_error_type)) return true; + return pt_mixed_type_witness_equals(self, type, out); + } + + /* protected recreate(): new self($this->reason, $witnessType) (an error + * has nothing subtracted and is not an explicit mixed); UNDEF = pending + * exception */ + zv::Val recreate(zval *witnessType) const + { + zval *reasonSlot = reason(); + if (UNEXPECTED(reasonSlot == NULL)) return zv::Val(); + return create(Z_TYPE_P(reasonSlot) == IS_NULL ? NULL : Z_STR_P(reasonSlot), witnessType); + } private: zend_object *self; @@ -119,6 +174,14 @@ void pt_error_type_construct(zend_object *self, zend_string *reason) ErrorType(self).construct(reason); } +static void ZEND_FASTCALL etRecreate(INTERNAL_FUNCTION_PARAMETERS) +{ + bool isExplicitMixed; + zval *subtractedType, *witnessType; + if (!zp::parse(execute_data, isExplicitMixed, subtractedType, witnessType)) RETURN_THROWS(); + PT_RETURN_VAL(ErrorType(Z_OBJ_P(ZEND_THIS)).recreate(witnessType)); +} + /* {{{ engine ABI glue: parameter parsing + registration */ #define PT_THIS ErrorType(Z_OBJ_P(ZEND_THIS)) @@ -142,8 +205,9 @@ PT_MINIT_REGISTRATION(pt_register_error_type) cls.method(sigs::__construct, [](INTERNAL_FUNCTION_PARAMETERS) { zend_string *reason = NULL; - if (!zp::parse>(execute_data, reason)) RETURN_THROWS(); - PT_THIS.construct(reason); + zval *witnessType = NULL; + if (!zp::parse, zp::Opt>(execute_data, reason, witnessType)) RETURN_THROWS(); + PT_THIS.construct(reason, witnessType); }); cls.method(sigs::getReason, [](INTERNAL_FUNCTION_PARAMETERS) { @@ -162,16 +226,25 @@ PT_MINIT_REGISTRATION(pt_register_error_type) cls.op(PT_OP_GET_ITERABLE_VALUE_TYPE, PT_OP_LAMBDA { return ErrorType::create(); }); cls.method(sigs::subtract, [](INTERNAL_FUNCTION_PARAMETERS) { - PT_ARGS(1, 1); - PT_RETURN_VAL(ErrorType::subtract()); + zval *type; + if (!zp::parse(execute_data, type)) RETURN_THROWS(); + PT_RETURN_VAL(PT_THIS.subtract(type)); }); cls.method(sigs::equals, [](INTERNAL_FUNCTION_PARAMETERS) { zval *type; if (!zp::parse(execute_data, type)) RETURN_THROWS(); - RETURN_BOOL(ErrorType::equals(type)); + bool result; + if (UNEXPECTED(!PT_THIS.equals(type, result))) RETURN_THROWS(); + RETURN_BOOL(result); }); - cls.op(PT_OP_EQUALS, PT_OP_LAMBDA { return zv::Val::boolean(ErrorType::equals(argv)); }); + cls.op(PT_OP_EQUALS, PT_OP_LAMBDA { + bool result; + if (UNEXPECTED(!ErrorType(self).equals(argv, result))) return zv::Val(); + return zv::Val::boolean(result); + }); + + cls.method(sigs::recreate, etRecreate); cls.method(sigs::toNativePhpTypeNode, [](INTERNAL_FUNCTION_PARAMETERS) { zval *position; diff --git a/turbo-ext/src/MixedType.cpp b/turbo-ext/src/MixedType.cpp index 202c05e476e..6d8c00b8ac7 100644 --- a/turbo-ext/src/MixedType.cpp +++ b/turbo-ext/src/MixedType.cpp @@ -31,6 +31,8 @@ namespace slots = ptdecl::MixedType::slot; namespace sigs = ptdecl::MixedType::sig; +static void ZEND_FASTCALL mtRecreate(INTERNAL_FUNCTION_PARAMETERS); + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wunknown-warning-option" @@ -139,7 +141,33 @@ class MixedType if (UNEXPECTED(!isExplicitMixed(explicitMixed))) return zv::Val(); zval *subtracted = subtractedType(); if (UNEXPECTED(subtracted == NULL)) return zv::Val(); - return create(explicitMixed, Z_TYPE_P(subtracted) == IS_NULL ? NULL : subtracted, witness); + return thisRecreate(explicitMixed, Z_TYPE_P(subtracted) == IS_NULL ? NULL : subtracted, witness); + } + + /* protected recreate(): new self($isExplicitMixed, $subtractedType, + * $witnessType); the arguments borrowed, NULL for null */ + static zv::Val recreate(bool isExplicitMixed, zval *subtractedType, zval *witnessType) + { + return create(isExplicitMixed, subtractedType, witnessType); + } + + /* $this->recreate(...): the body above for the class itself and a + * subclass that keeps it, the subclass's override otherwise (ErrorType + * keeps its kind); UNDEF = pending exception */ + zv::Val thisRecreate(bool isExplicitMixed, zval *subtractedType, zval *witnessType) const + { + if (EXPECTED(isExact() || pt_type_method_is(self, PT_LC("recreate"), mtRecreate))) return recreate(isExplicitMixed, subtractedType, witnessType); + zval args[3]; + ZVAL_BOOL(&args[0], isExplicitMixed); + if (subtractedType == NULL) ZVAL_NULL(&args[1]); else ZVAL_COPY_VALUE(&args[1], subtractedType); + if (witnessType == NULL) ZVAL_NULL(&args[2]); else ZVAL_COPY_VALUE(&args[2], witnessType); + zv::Val result = pt_type_call(self, PT_LC("recreate"), 3, args); + if (UNEXPECTED(result.isUndef())) return zv::Val(); + if (UNEXPECTED(Z_TYPE_P(result.raw()) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(result.raw()), pt_ce_mixed_type))) { + zend_type_error("phpstan_turbo: recreate() must return %s", ZSTR_VAL(pt_ce_mixed_type->name)); + return zv::Val(); + } + return result; } /* $this without a witness, $cb applied to it otherwise; UNDEF = pending @@ -894,7 +922,7 @@ class MixedType bool explicitMixed = false; if (UNEXPECTED(!isExplicitMixed(explicitMixed))) return zv::Val(); - return create(explicitMixed, type, remainingWitness.isUndef() ? NULL : remainingWitness.raw()); + return thisRecreate(explicitMixed, type, remainingWitness.isUndef() ? NULL : remainingWitness.raw()); } /* new self($this->isExplicitMixed, $subtractedType); UNDEF = pending @@ -905,7 +933,7 @@ class MixedType if (UNEXPECTED(!isExplicitMixed(explicitMixed))) return zv::Val(); zval *witness = witnessType(); if (UNEXPECTED(witness == NULL)) return zv::Val(); - return create(explicitMixed, subtractedType, Z_TYPE_P(witness) == IS_NULL ? NULL : witness); + return thisRecreate(explicitMixed, subtractedType, Z_TYPE_P(witness) == IS_NULL ? NULL : witness); } /* no when the subtracted type covers every array, maybe otherwise; -1 = @@ -1430,9 +1458,9 @@ bool pt_mixed_type_new(zval *out, bool isExplicitMixed, zval *subtractedType) return pt_val_into(MixedType::create(isExplicitMixed, subtractedType), out); } -void pt_mixed_type_construct(zend_object *self, bool isExplicitMixed, zval *subtractedType) +void pt_mixed_type_construct(zend_object *self, bool isExplicitMixed, zval *subtractedType, zval *witnessType) { - MixedType(self).construct(isExplicitMixed, subtractedType); + MixedType(self).construct(isExplicitMixed, subtractedType, witnessType); } zv::Val pt_mixed_type_describe(zend_object *self, zval *level) @@ -1440,10 +1468,28 @@ zv::Val pt_mixed_type_describe(zend_object *self, zval *level) return MixedType(self).describe(level); } +zval *pt_mixed_type_witness(zend_object *self) +{ + return MixedType::witnessTypeOf(self); +} + +bool pt_mixed_type_witness_equals(zend_object *self, zval *type, bool &out) +{ + return MixedType(self).witnessEquals(type, out); +} + /* {{{ engine ABI glue: parameter parsing + registration */ #define PT_THIS MixedType(Z_OBJ_P(ZEND_THIS)) +static void ZEND_FASTCALL mtRecreate(INTERNAL_FUNCTION_PARAMETERS) +{ + bool isExplicitMixed; + zval *subtractedType, *witnessType; + if (!zp::parse(execute_data, isExplicitMixed, subtractedType, witnessType)) RETURN_THROWS(); + PT_RETURN_VAL(MixedType::recreate(isExplicitMixed, subtractedType, witnessType)); +} + /* IdentityCallback::identity(Type $type): Type */ static void ZEND_FASTCALL identityCallbackIdentity(INTERNAL_FUNCTION_PARAMETERS) { @@ -1923,6 +1969,7 @@ PT_MINIT_REGISTRATION(pt_register_mixed_type) RETURN_COPY(witness); }); cls.method<&MixedType::changeWitnessType, zp::ObjOrNull>(sigs::changeWitnessType); + cls.method(sigs::recreate, mtRecreate); cls.method(sigs::traverse, [](INTERNAL_FUNCTION_PARAMETERS) { zend_fcall_info fci; diff --git a/turbo-ext/src/TypeCombinatorCalls.cpp b/turbo-ext/src/TypeCombinatorCalls.cpp index 392f95415af..6febd63d0c5 100644 --- a/turbo-ext/src/TypeCombinatorCalls.cpp +++ b/turbo-ext/src/TypeCombinatorCalls.cpp @@ -78,9 +78,9 @@ zv::Val pt_type_combinator_union(uint32_t argc, zval *argv) zv::Val pt_type_combinator_join_values(uint32_t argc, zval *argv) { zv::Val unioned = pt_type_combinator_union(argc, argv); - /* if (get_class($union) !== MixedType::class || count($types) < 2) return $union; + /* if (!self::holdsWitnessType($union) || count($types) < 2) return $union; * return self::witnessAbsorbedTypes($union, ...$types); */ - if (unioned.isUndef() || argc < 2 || Z_TYPE_P(unioned.raw()) != IS_OBJECT || Z_OBJCE_P(unioned.raw()) != pt_ce_mixed_type) { + if (unioned.isUndef() || argc < 2 || Z_TYPE_P(unioned.raw()) != IS_OBJECT || (Z_OBJCE_P(unioned.raw()) != pt_ce_mixed_type && Z_OBJCE_P(unioned.raw()) != pt_ce_error_type)) { return unioned; } std::vector args(argc + 1); diff --git a/turbo-ext/src/TypeTraits.h b/turbo-ext/src/TypeTraits.h index d7c57947d71..75a1310df39 100644 --- a/turbo-ext/src/TypeTraits.h +++ b/turbo-ext/src/TypeTraits.h @@ -1045,11 +1045,17 @@ inline zv::Val pt_type_finite_type_set_key(zval *type) /* parent::__construct($isExplicitMixed, $subtractedType) — MixedType's * constructor body on the object ($subtractedType NULL for null) * (MixedType.cpp) */ -void pt_mixed_type_construct(zend_object *self, bool isExplicitMixed, zval *subtractedType); +void pt_mixed_type_construct(zend_object *self, bool isExplicitMixed, zval *subtractedType, zval *witnessType = NULL); /* the body of MixedType::describe() run on the object (its own class * answering the $this-calls inside it, as parent:: keeps it); UNDEF = * pending exception (MixedType.cpp) */ zv::Val pt_mixed_type_describe(zend_object *self, zval *level); +/* $this->witnessType (borrowed, IS_NULL or IS_OBJECT); NULL with an Error + * pending when the constructor never ran (MixedType.cpp) */ +zval *pt_mixed_type_witness(zend_object *self); +/* both witnesses null, or equal ones; $type a MixedType; false with an + * exception pending (MixedType.cpp) */ +[[nodiscard]] bool pt_mixed_type_witness_equals(zend_object *self, zval *type, bool &out); /* parent::__construct($isExplicit, $reason) — NeverType's constructor body * on the object ($reason NULL for null) (NeverType.cpp) */ void pt_never_type_construct(zend_object *self, bool isExplicit, zend_string *reason); diff --git a/turbo-ext/src/generated/ErrorType.h b/turbo-ext/src/generated/ErrorType.h index 4429b0a6e72..7579fbbcf53 100644 --- a/turbo-ext/src/generated/ErrorType.h +++ b/turbo-ext/src/generated/ErrorType.h @@ -29,47 +29,62 @@ namespace sigtab { inline constexpr char strings[] = "reason\0" /* 0 */ "null\0" /* 7 */ - "__construct\0" /* 12 */ - "\0" /* 24 */ - "getReason\0" /* 25 */ - "level\0" /* 35 */ - "PHPStan\\Type\\VerbosityLevel\0" /* 41 */ - "describe\0" /* 69 */ - "PHPStan\\Type\\Type\0" /* 78 */ - "getIterableKeyType\0" /* 96 */ - "getIterableValueType\0" /* 115 */ - "type\0" /* 136 */ - "subtract\0" /* 141 */ - "equals\0" /* 150 */ - "position\0" /* 157 */ - "PHPStan\\Type\\NativeTypePosition\0" /* 166 */ - "toNativePhpTypeNode"; /* 198 */ + "witnessType\0" /* 12 */ + "PHPStan\\Type\\Type\0" /* 24 */ + "__construct\0" /* 42 */ + "\0" /* 54 */ + "getReason\0" /* 55 */ + "level\0" /* 65 */ + "PHPStan\\Type\\VerbosityLevel\0" /* 71 */ + "describe\0" /* 99 */ + "describeWitnessType\0" /* 108 */ + "getIterableKeyType\0" /* 128 */ + "getIterableValueType\0" /* 147 */ + "type\0" /* 168 */ + "subtract\0" /* 173 */ + "equals\0" /* 182 */ + "isExplicitMixed\0" /* 189 */ + "subtractedType\0" /* 205 */ + "PHPStan\\Type\\MixedType\0" /* 220 */ + "recreate\0" /* 243 */ + "position\0" /* 252 */ + "PHPStan\\Type\\NativeTypePosition\0" /* 261 */ + "toNativePhpTypeNode"; /* 293 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 7), /* __construct $reason */ - reg::packed(24, MAY_BE_NULL | MAY_BE_STRING), /* getReason return */ - reg::packed(35, 0, 41), /* describe $level */ - reg::packed(24, MAY_BE_STRING), /* describe return */ - reg::packed(24, 0, 78), /* getIterableKeyType return */ - reg::packed(24, 0, 78), /* getIterableValueType return */ - reg::packed(136, 0, 78), /* subtract $type */ - reg::packed(24, 0, 78), /* subtract return */ - reg::packed(136, 0, 78), /* equals $type */ - reg::packed(24, MAY_BE_BOOL), /* equals return */ - reg::packed(157, 0, 166), /* toNativePhpTypeNode $position */ + reg::packed(12, MAY_BE_NULL, 24, false, false, 7), /* __construct $witnessType */ + reg::packed(54, MAY_BE_NULL | MAY_BE_STRING), /* getReason return */ + reg::packed(65, 0, 71), /* describe $level */ + reg::packed(54, MAY_BE_STRING), /* describe return */ + reg::packed(65, 0, 71), /* describeWitnessType $level */ + reg::packed(54, MAY_BE_STRING), /* describeWitnessType return */ + reg::packed(54, 0, 24), /* getIterableKeyType return */ + reg::packed(54, 0, 24), /* getIterableValueType return */ + reg::packed(168, 0, 24), /* subtract $type */ + reg::packed(54, 0, 24), /* subtract return */ + reg::packed(168, 0, 24), /* equals $type */ + reg::packed(54, MAY_BE_BOOL), /* equals return */ + reg::packed(189, MAY_BE_BOOL), /* recreate $isExplicitMixed */ + reg::packed(205, MAY_BE_NULL, 24), /* recreate $subtractedType */ + reg::packed(12, MAY_BE_NULL, 24), /* recreate $witnessType */ + reg::packed(54, 0, 220), /* recreate return */ + reg::packed(252, 0, 261), /* toNativePhpTypeNode $position */ }; using Sig = reg::Sig; } // namespace sigtab /* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ namespace sig { -inline constexpr sigtab::Sig __construct = { { 12 /* __construct */, 0, 0, 1, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getReason = { { 25 /* getReason */, 0, 1, 0, 1, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig describe = { { 69 /* describe */, 1, 2, 1, 3, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getIterableKeyType = { { 96 /* getIterableKeyType */, 0, 4, 0, 4, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getIterableValueType = { { 115 /* getIterableValueType */, 0, 5, 0, 5, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig subtract = { { 141 /* subtract */, 1, 6, 1, 7, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig equals = { { 150 /* equals */, 1, 8, 1, 9, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig toNativePhpTypeNode = { { 198 /* toNativePhpTypeNode */, 1, 10, 1, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig __construct = { { 42 /* __construct */, 0, 0, 2, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getReason = { { 55 /* getReason */, 0, 2, 0, 2, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig describe = { { 99 /* describe */, 1, 3, 1, 4, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig describeWitnessType = { { 108 /* describeWitnessType */, 1, 5, 1, 6, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getIterableKeyType = { { 128 /* getIterableKeyType */, 0, 7, 0, 7, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getIterableValueType = { { 147 /* getIterableValueType */, 0, 8, 0, 8, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig subtract = { { 173 /* subtract */, 1, 9, 1, 10, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig equals = { { 182 /* equals */, 1, 11, 1, 12, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig recreate = { { 243 /* recreate */, 3, 13, 3, 16, ZEND_ACC_PROTECTED } }; +inline constexpr sigtab::Sig toNativePhpTypeNode = { { 293 /* toNativePhpTypeNode */, 1, 17, 1, reg::NoArg, ZEND_ACC_PUBLIC } }; } // namespace sig } // namespace ptdecl::ErrorType diff --git a/turbo-ext/src/generated/MixedType.h b/turbo-ext/src/generated/MixedType.h index 513d5149a5e..55080d8e1a5 100644 --- a/turbo-ext/src/generated/MixedType.h +++ b/turbo-ext/src/generated/MixedType.h @@ -192,56 +192,57 @@ inline constexpr char strings[] = "isBareMixed\0" /* 2597 */ "getWitnessType\0" /* 2609 */ "changeWitnessType\0" /* 2624 */ - "getSubtractedType\0" /* 2642 */ - "traverse\0" /* 2660 */ - "right\0" /* 2669 */ - "traverseSimultaneously\0" /* 2675 */ - "isArray\0" /* 2698 */ - "isConstantArray\0" /* 2706 */ - "isOversizedArray\0" /* 2722 */ - "isList\0" /* 2739 */ - "getKindMask\0" /* 2746 */ - "isNull\0" /* 2758 */ - "isConstantValue\0" /* 2765 */ - "isConstantScalarValue\0" /* 2781 */ - "getConstantScalarTypes\0" /* 2803 */ - "getConstantScalarValues\0" /* 2826 */ - "isTrue\0" /* 2850 */ - "isFalse\0" /* 2857 */ - "isBoolean\0" /* 2865 */ - "isFloat\0" /* 2875 */ - "isInteger\0" /* 2883 */ - "isString\0" /* 2893 */ - "isNumericString\0" /* 2902 */ - "isDecimalIntegerString\0" /* 2918 */ - "isNonEmptyString\0" /* 2941 */ - "isNonFalsyString\0" /* 2958 */ - "isLiteralString\0" /* 2975 */ - "getStringRefinement\0" /* 2991 */ - "isLowercaseString\0" /* 3011 */ - "isUppercaseString\0" /* 3029 */ - "isClassString\0" /* 3047 */ - "getClassStringObjectType\0" /* 3061 */ - "getObjectTypeOrClassStringObjectType\0" /* 3086 */ - "isVoid\0" /* 3123 */ - "isScalar\0" /* 3130 */ - "phpVersion\0" /* 3139 */ - "PHPStan\\Php\\PhpVersion\0" /* 3150 */ - "looseCompare\0" /* 3173 */ - "typeToRemove\0" /* 3186 */ - "tryRemove\0" /* 3199 */ - "exponent\0" /* 3209 */ - "arithmeticPower\0" /* 3218 */ - "getFiniteTypes\0" /* 3234 */ - "PHPStan\\PhpDocParser\\Ast\\Type\\TypeNode\0" /* 3249 */ - "toPhpDocNode\0" /* 3288 */ - "position\0" /* 3301 */ - "PHPStan\\Type\\NativeTypePosition\0" /* 3310 */ - "toNativePhpTypeNode\0" /* 3342 */ - "hasTemplateOrLateResolvableType\0" /* 3362 */ - "hasUnresolvedTemplateArgumentType\0" /* 3394 */ - "PHPStan\\Type\\ValueSet\0" /* 3428 */ - "toValueSet"; /* 3450 */ + "recreate\0" /* 2642 */ + "getSubtractedType\0" /* 2651 */ + "traverse\0" /* 2669 */ + "right\0" /* 2678 */ + "traverseSimultaneously\0" /* 2684 */ + "isArray\0" /* 2707 */ + "isConstantArray\0" /* 2715 */ + "isOversizedArray\0" /* 2731 */ + "isList\0" /* 2748 */ + "getKindMask\0" /* 2755 */ + "isNull\0" /* 2767 */ + "isConstantValue\0" /* 2774 */ + "isConstantScalarValue\0" /* 2790 */ + "getConstantScalarTypes\0" /* 2812 */ + "getConstantScalarValues\0" /* 2835 */ + "isTrue\0" /* 2859 */ + "isFalse\0" /* 2866 */ + "isBoolean\0" /* 2874 */ + "isFloat\0" /* 2884 */ + "isInteger\0" /* 2892 */ + "isString\0" /* 2902 */ + "isNumericString\0" /* 2911 */ + "isDecimalIntegerString\0" /* 2927 */ + "isNonEmptyString\0" /* 2950 */ + "isNonFalsyString\0" /* 2967 */ + "isLiteralString\0" /* 2984 */ + "getStringRefinement\0" /* 3000 */ + "isLowercaseString\0" /* 3020 */ + "isUppercaseString\0" /* 3038 */ + "isClassString\0" /* 3056 */ + "getClassStringObjectType\0" /* 3070 */ + "getObjectTypeOrClassStringObjectType\0" /* 3095 */ + "isVoid\0" /* 3132 */ + "isScalar\0" /* 3139 */ + "phpVersion\0" /* 3148 */ + "PHPStan\\Php\\PhpVersion\0" /* 3159 */ + "looseCompare\0" /* 3182 */ + "typeToRemove\0" /* 3195 */ + "tryRemove\0" /* 3208 */ + "exponent\0" /* 3218 */ + "arithmeticPower\0" /* 3227 */ + "getFiniteTypes\0" /* 3243 */ + "PHPStan\\PhpDocParser\\Ast\\Type\\TypeNode\0" /* 3258 */ + "toPhpDocNode\0" /* 3297 */ + "position\0" /* 3310 */ + "PHPStan\\Type\\NativeTypePosition\0" /* 3319 */ + "toNativePhpTypeNode\0" /* 3351 */ + "hasTemplateOrLateResolvableType\0" /* 3371 */ + "hasUnresolvedTemplateArgumentType\0" /* 3403 */ + "PHPStan\\Type\\ValueSet\0" /* 3437 */ + "toValueSet"; /* 3459 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, MAY_BE_BOOL, reg::NoString, false, false, 16), /* __construct $isExplicitMixed */ reg::packed(22, MAY_BE_NULL, 37, false, false, 55), /* __construct $subtractedType */ @@ -418,10 +419,14 @@ inline constexpr reg::PackedArg args[] = { reg::packed(84, MAY_BE_NULL, 37), /* getWitnessType return */ reg::packed(60, MAY_BE_NULL, 37), /* changeWitnessType $witnessType */ reg::packed(84, 0, 251), /* changeWitnessType return */ + reg::packed(0, MAY_BE_BOOL), /* recreate $isExplicitMixed */ + reg::packed(22, MAY_BE_NULL, 37), /* recreate $subtractedType */ + reg::packed(60, MAY_BE_NULL, 37), /* recreate $witnessType */ + reg::packed(84, 0, 251), /* recreate return */ reg::packed(84, MAY_BE_NULL, 37), /* getSubtractedType return */ reg::packed(772, MAY_BE_CALLABLE), /* traverse $cb */ reg::packed(84, 0, 37), /* traverse return */ - reg::packed(2669, 0, 37), /* traverseSimultaneously $right */ + reg::packed(2678, 0, 37), /* traverseSimultaneously $right */ reg::packed(772, MAY_BE_CALLABLE), /* traverseSimultaneously $cb */ reg::packed(84, 0, 37), /* traverseSimultaneously return */ reg::packed(84, 0, 459), /* isArray return */ @@ -454,19 +459,19 @@ inline constexpr reg::PackedArg args[] = { reg::packed(84, 0, 459), /* isVoid return */ reg::packed(84, 0, 459), /* isScalar return */ reg::packed(199, 0, 37), /* looseCompare $type */ - reg::packed(3139, 0, 3150), /* looseCompare $phpVersion */ + reg::packed(3148, 0, 3159), /* looseCompare $phpVersion */ reg::packed(84, 0, 1892), /* looseCompare return */ - reg::packed(3186, 0, 37), /* tryRemove $typeToRemove */ + reg::packed(3195, 0, 37), /* tryRemove $typeToRemove */ reg::packed(84, MAY_BE_NULL, 37), /* tryRemove return */ - reg::packed(3209, 0, 37), /* arithmeticPower $exponent */ - reg::packed(3139, 0, 3150), /* arithmeticPower $phpVersion */ + reg::packed(3218, 0, 37), /* arithmeticPower $exponent */ + reg::packed(3148, 0, 3159), /* arithmeticPower $phpVersion */ reg::packed(84, 0, 37), /* arithmeticPower return */ reg::packed(84, MAY_BE_ARRAY), /* getFiniteTypes return */ - reg::packed(84, 0, 3249), /* toPhpDocNode return */ - reg::packed(3301, 0, 3310), /* toNativePhpTypeNode $position */ + reg::packed(84, 0, 3258), /* toPhpDocNode return */ + reg::packed(3310, 0, 3319), /* toNativePhpTypeNode $position */ reg::packed(84, MAY_BE_BOOL), /* hasTemplateOrLateResolvableType return */ reg::packed(84, MAY_BE_BOOL), /* hasUnresolvedTemplateArgumentType return */ - reg::packed(84, 0, 3428), /* toValueSet return */ + reg::packed(84, 0, 3437), /* toValueSet return */ }; using Sig = reg::Sig; } // namespace sigtab @@ -573,47 +578,48 @@ inline constexpr sigtab::Sig changeSubtractedType = { { 2576 /* changeSubtracted inline constexpr sigtab::Sig isBareMixed = { { 2597 /* isBareMixed */, 2, 169, 2, 171, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; inline constexpr sigtab::Sig getWitnessType = { { 2609 /* getWitnessType */, 0, 172, 0, 172, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig changeWitnessType = { { 2624 /* changeWitnessType */, 1, 173, 1, 174, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getSubtractedType = { { 2642 /* getSubtractedType */, 0, 175, 0, 175, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig traverse = { { 2660 /* traverse */, 1, 176, 1, 177, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig traverseSimultaneously = { { 2675 /* traverseSimultaneously */, 2, 178, 2, 180, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isArray = { { 2698 /* isArray */, 0, 181, 0, 181, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isConstantArray = { { 2706 /* isConstantArray */, 0, 182, 0, 182, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isOversizedArray = { { 2722 /* isOversizedArray */, 0, 183, 0, 183, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isList = { { 2739 /* isList */, 0, 184, 0, 184, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getKindMask = { { 2746 /* getKindMask */, 0, 185, 0, 185, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isNull = { { 2758 /* isNull */, 0, 186, 0, 186, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isConstantValue = { { 2765 /* isConstantValue */, 0, 187, 0, 187, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isConstantScalarValue = { { 2781 /* isConstantScalarValue */, 0, 188, 0, 188, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantScalarTypes = { { 2803 /* getConstantScalarTypes */, 0, 189, 0, 189, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantScalarValues = { { 2826 /* getConstantScalarValues */, 0, 190, 0, 190, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isTrue = { { 2850 /* isTrue */, 0, 191, 0, 191, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isFalse = { { 2857 /* isFalse */, 0, 192, 0, 192, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isBoolean = { { 2865 /* isBoolean */, 0, 193, 0, 193, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isFloat = { { 2875 /* isFloat */, 0, 194, 0, 194, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInteger = { { 2883 /* isInteger */, 0, 195, 0, 195, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isString = { { 2893 /* isString */, 0, 196, 0, 196, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isNumericString = { { 2902 /* isNumericString */, 0, 197, 0, 197, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isDecimalIntegerString = { { 2918 /* isDecimalIntegerString */, 0, 198, 0, 198, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isNonEmptyString = { { 2941 /* isNonEmptyString */, 0, 199, 0, 199, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isNonFalsyString = { { 2958 /* isNonFalsyString */, 0, 200, 0, 200, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isLiteralString = { { 2975 /* isLiteralString */, 0, 201, 0, 201, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getStringRefinement = { { 2991 /* getStringRefinement */, 0, 202, 0, 202, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isLowercaseString = { { 3011 /* isLowercaseString */, 0, 203, 0, 203, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isUppercaseString = { { 3029 /* isUppercaseString */, 0, 204, 0, 204, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isClassString = { { 3047 /* isClassString */, 0, 205, 0, 205, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getClassStringObjectType = { { 3061 /* getClassStringObjectType */, 0, 206, 0, 206, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getObjectTypeOrClassStringObjectType = { { 3086 /* getObjectTypeOrClassStringObjectType */, 0, 207, 0, 207, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isVoid = { { 3123 /* isVoid */, 0, 208, 0, 208, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isScalar = { { 3130 /* isScalar */, 0, 209, 0, 209, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig looseCompare = { { 3173 /* looseCompare */, 2, 210, 2, 212, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig tryRemove = { { 3199 /* tryRemove */, 1, 213, 1, 214, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig arithmeticPower = { { 3218 /* arithmeticPower */, 2, 215, 2, 217, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFiniteTypes = { { 3234 /* getFiniteTypes */, 0, 218, 0, 218, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig toPhpDocNode = { { 3288 /* toPhpDocNode */, 0, 219, 0, 219, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig toNativePhpTypeNode = { { 3342 /* toNativePhpTypeNode */, 1, 220, 1, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig hasTemplateOrLateResolvableType = { { 3362 /* hasTemplateOrLateResolvableType */, 0, 221, 0, 221, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig hasUnresolvedTemplateArgumentType = { { 3394 /* hasUnresolvedTemplateArgumentType */, 0, 222, 0, 222, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig toValueSet = { { 3450 /* toValueSet */, 0, 223, 0, 223, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig recreate = { { 2642 /* recreate */, 3, 175, 3, 178, ZEND_ACC_PROTECTED } }; +inline constexpr sigtab::Sig getSubtractedType = { { 2651 /* getSubtractedType */, 0, 179, 0, 179, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig traverse = { { 2669 /* traverse */, 1, 180, 1, 181, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig traverseSimultaneously = { { 2684 /* traverseSimultaneously */, 2, 182, 2, 184, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isArray = { { 2707 /* isArray */, 0, 185, 0, 185, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isConstantArray = { { 2715 /* isConstantArray */, 0, 186, 0, 186, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isOversizedArray = { { 2731 /* isOversizedArray */, 0, 187, 0, 187, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isList = { { 2748 /* isList */, 0, 188, 0, 188, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getKindMask = { { 2755 /* getKindMask */, 0, 189, 0, 189, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isNull = { { 2767 /* isNull */, 0, 190, 0, 190, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isConstantValue = { { 2774 /* isConstantValue */, 0, 191, 0, 191, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isConstantScalarValue = { { 2790 /* isConstantScalarValue */, 0, 192, 0, 192, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantScalarTypes = { { 2812 /* getConstantScalarTypes */, 0, 193, 0, 193, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantScalarValues = { { 2835 /* getConstantScalarValues */, 0, 194, 0, 194, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isTrue = { { 2859 /* isTrue */, 0, 195, 0, 195, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isFalse = { { 2866 /* isFalse */, 0, 196, 0, 196, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isBoolean = { { 2874 /* isBoolean */, 0, 197, 0, 197, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isFloat = { { 2884 /* isFloat */, 0, 198, 0, 198, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInteger = { { 2892 /* isInteger */, 0, 199, 0, 199, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isString = { { 2902 /* isString */, 0, 200, 0, 200, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isNumericString = { { 2911 /* isNumericString */, 0, 201, 0, 201, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isDecimalIntegerString = { { 2927 /* isDecimalIntegerString */, 0, 202, 0, 202, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isNonEmptyString = { { 2950 /* isNonEmptyString */, 0, 203, 0, 203, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isNonFalsyString = { { 2967 /* isNonFalsyString */, 0, 204, 0, 204, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isLiteralString = { { 2984 /* isLiteralString */, 0, 205, 0, 205, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getStringRefinement = { { 3000 /* getStringRefinement */, 0, 206, 0, 206, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isLowercaseString = { { 3020 /* isLowercaseString */, 0, 207, 0, 207, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isUppercaseString = { { 3038 /* isUppercaseString */, 0, 208, 0, 208, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isClassString = { { 3056 /* isClassString */, 0, 209, 0, 209, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getClassStringObjectType = { { 3070 /* getClassStringObjectType */, 0, 210, 0, 210, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getObjectTypeOrClassStringObjectType = { { 3095 /* getObjectTypeOrClassStringObjectType */, 0, 211, 0, 211, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isVoid = { { 3132 /* isVoid */, 0, 212, 0, 212, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isScalar = { { 3139 /* isScalar */, 0, 213, 0, 213, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig looseCompare = { { 3182 /* looseCompare */, 2, 214, 2, 216, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig tryRemove = { { 3208 /* tryRemove */, 1, 217, 1, 218, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig arithmeticPower = { { 3227 /* arithmeticPower */, 2, 219, 2, 221, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFiniteTypes = { { 3243 /* getFiniteTypes */, 0, 222, 0, 222, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig toPhpDocNode = { { 3297 /* toPhpDocNode */, 0, 223, 0, 223, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig toNativePhpTypeNode = { { 3351 /* toNativePhpTypeNode */, 1, 224, 1, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig hasTemplateOrLateResolvableType = { { 3371 /* hasTemplateOrLateResolvableType */, 0, 225, 0, 225, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig hasUnresolvedTemplateArgumentType = { { 3403 /* hasUnresolvedTemplateArgumentType */, 0, 226, 0, 226, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig toValueSet = { { 3459 /* toValueSet */, 0, 227, 0, 227, ZEND_ACC_PUBLIC } }; } // namespace sig } // namespace ptdecl::MixedType