mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Add support for typed class constants in stubs
This commit is contained in:
@@ -5,46 +5,22 @@
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
final class Attribute
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_CLASS
|
||||
*/
|
||||
const TARGET_CLASS = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_FUNCTION
|
||||
*/
|
||||
const TARGET_FUNCTION = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_METHOD
|
||||
*/
|
||||
const TARGET_METHOD = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_PROPERTY
|
||||
*/
|
||||
const TARGET_PROPERTY = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_CLASS_CONST
|
||||
*/
|
||||
const TARGET_CLASS_CONSTANT = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_PARAMETER
|
||||
*/
|
||||
const TARGET_PARAMETER = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_TARGET_ALL
|
||||
*/
|
||||
const TARGET_ALL = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue ZEND_ATTRIBUTE_IS_REPEATABLE
|
||||
*/
|
||||
const IS_REPEATABLE = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS */
|
||||
const int TARGET_CLASS = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_FUNCTION */
|
||||
const int TARGET_FUNCTION = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_METHOD */
|
||||
const int TARGET_METHOD = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_PROPERTY */
|
||||
const int TARGET_PROPERTY = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS_CONST */
|
||||
const int TARGET_CLASS_CONSTANT = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_PARAMETER */
|
||||
const int TARGET_PARAMETER = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_TARGET_ALL */
|
||||
const int TARGET_ALL = UNKNOWN;
|
||||
/** @cvalue ZEND_ATTRIBUTE_IS_REPEATABLE */
|
||||
const int IS_REPEATABLE = UNKNOWN;
|
||||
|
||||
public int $flags;
|
||||
|
||||
|
||||
18
Zend/zend_attributes_arginfo.h
generated
18
Zend/zend_attributes_arginfo.h
generated
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: ab85fd8b8d2b1f1d2bc6c72c9663b112b8d6d2f8 */
|
||||
* Stub hash: 32f0458c20f04099e353a8300ffb19e40bc38f69 */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Attribute___construct, 0, 0, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "Attribute::TARGET_ALL")
|
||||
@@ -83,49 +83,49 @@ static zend_class_entry *register_class_Attribute(void)
|
||||
zval const_TARGET_CLASS_value;
|
||||
ZVAL_LONG(&const_TARGET_CLASS_value, ZEND_ATTRIBUTE_TARGET_CLASS);
|
||||
zend_string *const_TARGET_CLASS_name = zend_string_init_interned("TARGET_CLASS", sizeof("TARGET_CLASS") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_CLASS_name, &const_TARGET_CLASS_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_CLASS_name, &const_TARGET_CLASS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_CLASS_name);
|
||||
|
||||
zval const_TARGET_FUNCTION_value;
|
||||
ZVAL_LONG(&const_TARGET_FUNCTION_value, ZEND_ATTRIBUTE_TARGET_FUNCTION);
|
||||
zend_string *const_TARGET_FUNCTION_name = zend_string_init_interned("TARGET_FUNCTION", sizeof("TARGET_FUNCTION") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_FUNCTION_name, &const_TARGET_FUNCTION_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_FUNCTION_name, &const_TARGET_FUNCTION_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_FUNCTION_name);
|
||||
|
||||
zval const_TARGET_METHOD_value;
|
||||
ZVAL_LONG(&const_TARGET_METHOD_value, ZEND_ATTRIBUTE_TARGET_METHOD);
|
||||
zend_string *const_TARGET_METHOD_name = zend_string_init_interned("TARGET_METHOD", sizeof("TARGET_METHOD") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_METHOD_name, &const_TARGET_METHOD_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_METHOD_name, &const_TARGET_METHOD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_METHOD_name);
|
||||
|
||||
zval const_TARGET_PROPERTY_value;
|
||||
ZVAL_LONG(&const_TARGET_PROPERTY_value, ZEND_ATTRIBUTE_TARGET_PROPERTY);
|
||||
zend_string *const_TARGET_PROPERTY_name = zend_string_init_interned("TARGET_PROPERTY", sizeof("TARGET_PROPERTY") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_PROPERTY_name, &const_TARGET_PROPERTY_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_PROPERTY_name, &const_TARGET_PROPERTY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_PROPERTY_name);
|
||||
|
||||
zval const_TARGET_CLASS_CONSTANT_value;
|
||||
ZVAL_LONG(&const_TARGET_CLASS_CONSTANT_value, ZEND_ATTRIBUTE_TARGET_CLASS_CONST);
|
||||
zend_string *const_TARGET_CLASS_CONSTANT_name = zend_string_init_interned("TARGET_CLASS_CONSTANT", sizeof("TARGET_CLASS_CONSTANT") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_CLASS_CONSTANT_name, &const_TARGET_CLASS_CONSTANT_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_CLASS_CONSTANT_name, &const_TARGET_CLASS_CONSTANT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_CLASS_CONSTANT_name);
|
||||
|
||||
zval const_TARGET_PARAMETER_value;
|
||||
ZVAL_LONG(&const_TARGET_PARAMETER_value, ZEND_ATTRIBUTE_TARGET_PARAMETER);
|
||||
zend_string *const_TARGET_PARAMETER_name = zend_string_init_interned("TARGET_PARAMETER", sizeof("TARGET_PARAMETER") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_PARAMETER_name, &const_TARGET_PARAMETER_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_PARAMETER_name, &const_TARGET_PARAMETER_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_PARAMETER_name);
|
||||
|
||||
zval const_TARGET_ALL_value;
|
||||
ZVAL_LONG(&const_TARGET_ALL_value, ZEND_ATTRIBUTE_TARGET_ALL);
|
||||
zend_string *const_TARGET_ALL_name = zend_string_init_interned("TARGET_ALL", sizeof("TARGET_ALL") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_TARGET_ALL_name, &const_TARGET_ALL_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_TARGET_ALL_name, &const_TARGET_ALL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_TARGET_ALL_name);
|
||||
|
||||
zval const_IS_REPEATABLE_value;
|
||||
ZVAL_LONG(&const_IS_REPEATABLE_value, ZEND_ATTRIBUTE_IS_REPEATABLE);
|
||||
zend_string *const_IS_REPEATABLE_name = zend_string_init_interned("IS_REPEATABLE", sizeof("IS_REPEATABLE") - 1, 1);
|
||||
zend_declare_class_constant_ex(class_entry, const_IS_REPEATABLE_name, &const_IS_REPEATABLE_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_declare_typed_class_constant(class_entry, const_IS_REPEATABLE_name, &const_IS_REPEATABLE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(const_IS_REPEATABLE_name);
|
||||
|
||||
zval property_flags_default_value;
|
||||
|
||||
4
Zend/zend_exceptions_arginfo.h
generated
4
Zend/zend_exceptions_arginfo.h
generated
@@ -242,10 +242,10 @@ static zend_class_entry *register_class_Exception(zend_class_entry *class_entry_
|
||||
zend_declare_typed_property(class_entry, property_trace_name, &property_trace_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY));
|
||||
zend_string_release(property_trace_name);
|
||||
|
||||
zend_string *property_previous_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
|
||||
zval property_previous_default_value;
|
||||
ZVAL_NULL(&property_previous_default_value);
|
||||
zend_string *property_previous_name = zend_string_init("previous", sizeof("previous") - 1, 1);
|
||||
zend_string *property_previous_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_previous_name, &property_previous_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_previous_class_Throwable, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_previous_name);
|
||||
|
||||
@@ -312,10 +312,10 @@ static zend_class_entry *register_class_Error(zend_class_entry *class_entry_Thro
|
||||
zend_declare_typed_property(class_entry, property_trace_name, &property_trace_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY));
|
||||
zend_string_release(property_trace_name);
|
||||
|
||||
zend_string *property_previous_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
|
||||
zval property_previous_default_value;
|
||||
ZVAL_NULL(&property_previous_default_value);
|
||||
zend_string *property_previous_name = zend_string_init("previous", sizeof("previous") - 1, 1);
|
||||
zend_string *property_previous_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_previous_name, &property_previous_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_previous_class_Throwable, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_previous_name);
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ const PHP_70_VERSION_ID = 70000;
|
||||
const PHP_80_VERSION_ID = 80000;
|
||||
const PHP_81_VERSION_ID = 80100;
|
||||
const PHP_82_VERSION_ID = 80200;
|
||||
const ALL_PHP_VERSION_IDS = [PHP_70_VERSION_ID, PHP_80_VERSION_ID, PHP_81_VERSION_ID, PHP_82_VERSION_ID];
|
||||
const PHP_83_VERSION_ID = 80300;
|
||||
const ALL_PHP_VERSION_IDS = [PHP_70_VERSION_ID, PHP_80_VERSION_ID, PHP_81_VERSION_ID, PHP_82_VERSION_ID, PHP_83_VERSION_ID];
|
||||
|
||||
/**
|
||||
* @return FileInfo[]
|
||||
@@ -1584,22 +1585,22 @@ class EvaluatedValue
|
||||
// This visitor replaces the PHP constants by C constants. It allows direct expansion of the compiled constants, e.g. later in the pretty printer.
|
||||
$visitor = new class($allConstInfos) extends PhpParser\NodeVisitorAbstract
|
||||
{
|
||||
/** @var iterable<ConstInfo> */
|
||||
public array $visitedConstants = [];
|
||||
/** @var iterable<ConstInfo> */
|
||||
public iterable $allConstInfos;
|
||||
|
||||
/**
|
||||
* @param iterable<ConstInfo> $allConstInfos
|
||||
*/
|
||||
/** @param iterable<ConstInfo> $allConstInfos */
|
||||
public function __construct(iterable $allConstInfos)
|
||||
{
|
||||
$this->allConstInfos = $allConstInfos;
|
||||
}
|
||||
|
||||
/** @return Node|null */
|
||||
public function enterNode(Node $expr)
|
||||
{
|
||||
if (!$expr instanceof Expr\ConstFetch && !$expr instanceof Expr\ClassConstFetch) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($expr instanceof Expr\ClassConstFetch) {
|
||||
@@ -1609,7 +1610,7 @@ class EvaluatedValue
|
||||
}
|
||||
|
||||
if ($originatingConstName->isUnknown()) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach ($this->allConstInfos as $const) {
|
||||
@@ -1628,7 +1629,7 @@ class EvaluatedValue
|
||||
$isUnknownConstValue = false;
|
||||
|
||||
$evaluator = new ConstExprEvaluator(
|
||||
function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) {
|
||||
static function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) {
|
||||
// $expr is a ConstFetch with a name of a C macro here
|
||||
if (!$expr instanceof Expr\ConstFetch) {
|
||||
throw new Exception($this->getVariableTypeName() . " " . $this->getVariableLikeName() . " has an unsupported value");
|
||||
@@ -1645,8 +1646,8 @@ class EvaluatedValue
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($const->phpDocType) {
|
||||
$constType = $const->phpDocType->tryToSimpleType();
|
||||
$constType = ($const->phpDocType ?? $const->type)->tryToSimpleType();
|
||||
if ($constType) {
|
||||
if ($constType->isBool()) {
|
||||
return true;
|
||||
} elseif ($constType->isInt()) {
|
||||
@@ -1730,7 +1731,7 @@ class EvaluatedValue
|
||||
throw new Exception("Unimplemented default value");
|
||||
}
|
||||
} else {
|
||||
throw new Exception("Invalid default value: " . print_r($this->type, true));
|
||||
throw new Exception("Invalid default value: " . print_r($this->value, true) . ", type: " . print_r($this->type, true));
|
||||
}
|
||||
|
||||
return $code;
|
||||
@@ -1747,18 +1748,21 @@ class EvaluatedValue
|
||||
|
||||
abstract class VariableLike
|
||||
{
|
||||
public ?Type $phpDocType;
|
||||
public int $flags;
|
||||
public ?Type $type;
|
||||
public ?Type $phpDocType;
|
||||
public ?string $link;
|
||||
public ?int $phpVersionIdMinimumCompatibility;
|
||||
|
||||
public function __construct(
|
||||
int $flags,
|
||||
?Type $type,
|
||||
?Type $phpDocType,
|
||||
?string $link,
|
||||
?int $phpVersionIdMinimumCompatibility
|
||||
) {
|
||||
$this->flags = $flags;
|
||||
$this->type = $type;
|
||||
$this->phpDocType = $phpDocType;
|
||||
$this->link = $link;
|
||||
$this->phpVersionIdMinimumCompatibility = $phpVersionIdMinimumCompatibility;
|
||||
@@ -1770,8 +1774,6 @@ abstract class VariableLike
|
||||
|
||||
abstract protected function getVariableLikeName(): string;
|
||||
|
||||
abstract protected function addTypeToFieldSynopsis(DOMDocument $doc, DOMElement $fieldsynopsisElement): void;
|
||||
|
||||
abstract protected function getFieldSynopsisDefaultLinkend(): string;
|
||||
|
||||
abstract protected function getFieldSynopsisName(): string;
|
||||
@@ -1783,6 +1785,16 @@ abstract class VariableLike
|
||||
|
||||
abstract public function discardInfoForOldPhpVersions(): void;
|
||||
|
||||
protected function addTypeToFieldSynopsis(DOMDocument $doc, DOMElement $fieldsynopsisElement): void
|
||||
{
|
||||
$type = $this->phpDocType ?? $this->type;
|
||||
|
||||
if ($type) {
|
||||
$fieldsynopsisElement->appendChild(new DOMText("\n "));
|
||||
$fieldsynopsisElement->appendChild($type->getTypeForDoc($doc));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, string[]>
|
||||
*/
|
||||
@@ -1800,9 +1812,58 @@ abstract class VariableLike
|
||||
PHP_80_VERSION_ID => [$flags],
|
||||
PHP_81_VERSION_ID => [$flags],
|
||||
PHP_82_VERSION_ID => [$flags],
|
||||
PHP_83_VERSION_ID => [$flags],
|
||||
];
|
||||
}
|
||||
|
||||
protected function getTypeCode(string $variableLikeName, string &$code): string
|
||||
{
|
||||
$variableLikeType = $this->getVariableTypeName();
|
||||
|
||||
$typeCode = "";
|
||||
|
||||
if ($this->type) {
|
||||
$arginfoType = $this->type->toArginfoType();
|
||||
if ($arginfoType->hasClassType()) {
|
||||
if (count($arginfoType->classTypes) >= 2) {
|
||||
foreach ($arginfoType->classTypes as $classType) {
|
||||
$escapedClassName = $classType->toEscapedName();
|
||||
$varEscapedClassName = $classType->toVarEscapedName();
|
||||
$code .= "\tzend_string *{$variableLikeType}_{$variableLikeName}_class_{$varEscapedClassName} = zend_string_init(\"{$escapedClassName}\", sizeof(\"{$escapedClassName}\") - 1, 1);\n";
|
||||
}
|
||||
|
||||
$classTypeCount = count($arginfoType->classTypes);
|
||||
$code .= "\tzend_type_list *{$variableLikeType}_{$variableLikeName}_type_list = malloc(ZEND_TYPE_LIST_SIZE($classTypeCount));\n";
|
||||
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->num_types = $classTypeCount;\n";
|
||||
|
||||
foreach ($arginfoType->classTypes as $k => $classType) {
|
||||
$escapedClassName = $classType->toEscapedName();
|
||||
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->types[$k] = (zend_type) ZEND_TYPE_INIT_CLASS({$variableLikeType}_{$variableLikeName}_class_{$escapedClassName}, 0, 0);\n";
|
||||
}
|
||||
|
||||
$typeMaskCode = $this->type->toArginfoType()->toTypeMask();
|
||||
|
||||
if ($this->type->isIntersection) {
|
||||
$code .= "\tzend_type {$variableLikeType}_{$variableLikeName}_type = ZEND_TYPE_INIT_INTERSECTION({$variableLikeType}_{$variableLikeName}_type_list, $typeMaskCode);\n";
|
||||
} else {
|
||||
$code .= "\tzend_type {$variableLikeType}_{$variableLikeName}_type = ZEND_TYPE_INIT_UNION({$variableLikeType}_{$variableLikeName}_type_list, $typeMaskCode);\n";
|
||||
}
|
||||
$typeCode = "{$variableLikeType}_{$variableLikeName}_type";
|
||||
} else {
|
||||
$escapedClassName = $arginfoType->classTypes[0]->toEscapedName();
|
||||
$varEscapedClassName = $arginfoType->classTypes[0]->toVarEscapedName();
|
||||
$code .= "\tzend_string *{$variableLikeType}_{$variableLikeName}_class_{$varEscapedClassName} = zend_string_init(\"{$escapedClassName}\", sizeof(\"{$escapedClassName}\")-1, 1);\n";
|
||||
|
||||
$typeCode = "(zend_type) ZEND_TYPE_INIT_CLASS({$variableLikeType}_{$variableLikeName}_class_{$varEscapedClassName}, 0, " . $arginfoType->toTypeMask() . ")";
|
||||
}
|
||||
} else {
|
||||
$typeCode = "(zend_type) ZEND_TYPE_INIT_MASK(" . $arginfoType->toTypeMask() . ")";
|
||||
}
|
||||
}
|
||||
|
||||
return $typeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iterable<ConstInfo> $allConstInfos
|
||||
*/
|
||||
@@ -1883,6 +1944,7 @@ class ConstInfo extends VariableLike
|
||||
int $flags,
|
||||
Expr $value,
|
||||
?string $valueString,
|
||||
?Type $type,
|
||||
?Type $phpDocType,
|
||||
bool $isDeprecated,
|
||||
?string $cond,
|
||||
@@ -1896,7 +1958,7 @@ class ConstInfo extends VariableLike
|
||||
$this->isDeprecated = $isDeprecated;
|
||||
$this->cond = $cond;
|
||||
$this->cValue = $cValue;
|
||||
parent::__construct($flags, $phpDocType, $link, $phpVersionIdMinimumCompatibility);
|
||||
parent::__construct($flags, $type, $phpDocType, $link, $phpVersionIdMinimumCompatibility);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1906,7 +1968,7 @@ class ConstInfo extends VariableLike
|
||||
{
|
||||
return EvaluatedValue::createFromExpression(
|
||||
$this->value,
|
||||
$this->phpDocType->tryToSimpleType(),
|
||||
($this->phpDocType ?? $this->type)->tryToSimpleType(),
|
||||
$this->cValue,
|
||||
$allConstInfos
|
||||
);
|
||||
@@ -1931,7 +1993,7 @@ class ConstInfo extends VariableLike
|
||||
{
|
||||
$className = str_replace(["\\", "_"], ["-", "-"], $this->name->class->toLowerString());
|
||||
|
||||
return "$className.constants." . strtolower(str_replace("_", "-", $this->name->const));
|
||||
return "$className.constants." . strtolower(str_replace("_", "-", $this->getVariableLikeName()));
|
||||
}
|
||||
|
||||
protected function getFieldSynopsisName(): string
|
||||
@@ -1939,14 +2001,6 @@ class ConstInfo extends VariableLike
|
||||
return $this->name->__toString();
|
||||
}
|
||||
|
||||
protected function addTypeToFieldSynopsis(DOMDocument $doc, DOMElement $fieldsynopsisElement): void
|
||||
{
|
||||
if ($this->phpDocType) {
|
||||
$fieldsynopsisElement->appendChild(new DOMText("\n "));
|
||||
$fieldsynopsisElement->appendChild($this->phpDocType->getTypeForDoc($doc));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iterable<ConstInfo> $allConstInfos
|
||||
*/
|
||||
@@ -1967,6 +2021,7 @@ class ConstInfo extends VariableLike
|
||||
}
|
||||
|
||||
public function discardInfoForOldPhpVersions(): void {
|
||||
$this->type = null;
|
||||
$this->flags &= ~Class_::MODIFIER_FINAL;
|
||||
$this->isDeprecated = false;
|
||||
}
|
||||
@@ -1976,14 +2031,18 @@ class ConstInfo extends VariableLike
|
||||
*/
|
||||
public function getDeclaration(iterable $allConstInfos): string
|
||||
{
|
||||
$type = $this->phpDocType->tryToSimpleType();
|
||||
if ($type === null || !$type->isBuiltin) {
|
||||
throw new Exception("Constant " . $this->name->__toString() . " must have a simple built-in type");
|
||||
$simpleType = ($this->phpDocType ?? $this->type)->tryToSimpleType();
|
||||
if ($simpleType && $simpleType->name === "mixed") {
|
||||
$simpleType = null;
|
||||
}
|
||||
|
||||
$value = EvaluatedValue::createFromExpression($this->value, $simpleType, $this->cValue, $allConstInfos);
|
||||
if ($value->isUnknownConstValue && ($simpleType === null || !$simpleType->isBuiltin)) {
|
||||
throw new Exception("Constant " . $this->name->__toString() . " must have a built-in PHPDoc type as the type couldn't be inferred from its value");
|
||||
}
|
||||
|
||||
$value = EvaluatedValue::createFromExpression($this->value, $type, $this->cValue, $allConstInfos);
|
||||
// i.e. const NAME = UNKNOWN;, without the annotation
|
||||
if ($value->isUnknownConstValue && $this->cValue === null && $value->expr instanceof Expr\ConstFetch && $value->expr->name->__toString() == $this->name->__toString()) {
|
||||
if ($value->isUnknownConstValue && $this->cValue === null && $value->expr instanceof Expr\ConstFetch && $value->expr->name->__toString() === "UNKNOWN") {
|
||||
throw new Exception("Constant " . $this->name->__toString() . " must have a @cvalue annotation");
|
||||
}
|
||||
|
||||
@@ -2060,13 +2119,41 @@ class ConstInfo extends VariableLike
|
||||
$code .= "\tzend_string *const_{$constName}_name = zend_string_init_interned(\"$constName\", sizeof(\"$constName\") - 1, 1);\n";
|
||||
$nameCode = "const_{$constName}_name";
|
||||
|
||||
$template = "\tzend_declare_class_constant_ex(class_entry, $nameCode, &const_{$constName}_value, %s, NULL);\n";
|
||||
$flagsCode = generateVersionDependentFlagCode(
|
||||
$template,
|
||||
$this->getFlagsByPhpVersion(),
|
||||
$this->phpVersionIdMinimumCompatibility
|
||||
);
|
||||
$code .= implode("", $flagsCode);
|
||||
$php83MinimumCompatibility = $this->phpVersionIdMinimumCompatibility === null || $this->phpVersionIdMinimumCompatibility >= PHP_83_VERSION_ID;
|
||||
|
||||
if ($this->type && !$php83MinimumCompatibility) {
|
||||
$code .= "#if (PHP_VERSION_ID >= " . PHP_83_VERSION_ID . ")\n";
|
||||
}
|
||||
|
||||
if ($this->type) {
|
||||
$typeCode = $this->getTypeCode($constName, $code);
|
||||
$template = "\tzend_declare_typed_class_constant(class_entry, $nameCode, &const_{$constName}_value, %s, NULL, $typeCode);\n";
|
||||
$flagsCode = generateVersionDependentFlagCode(
|
||||
$template,
|
||||
$this->getFlagsByPhpVersion(),
|
||||
$this->phpVersionIdMinimumCompatibility
|
||||
);
|
||||
$code .= implode("", $flagsCode);
|
||||
}
|
||||
|
||||
if ($this->type && !$php83MinimumCompatibility) {
|
||||
$code .= "#else\n";
|
||||
}
|
||||
|
||||
if (!$this->type || !$php83MinimumCompatibility) {
|
||||
$template = "\tzend_declare_class_constant_ex(class_entry, $nameCode, &const_{$constName}_value, %s, NULL);\n";
|
||||
$flagsCode = generateVersionDependentFlagCode(
|
||||
$template,
|
||||
$this->getFlagsByPhpVersion(),
|
||||
$this->phpVersionIdMinimumCompatibility
|
||||
);
|
||||
$code .= implode("", $flagsCode);
|
||||
}
|
||||
|
||||
if ($this->type && !$php83MinimumCompatibility) {
|
||||
$code .= "#endif\n";
|
||||
}
|
||||
|
||||
$code .= "\tzend_string_release(const_{$constName}_name);\n";
|
||||
|
||||
return $code;
|
||||
@@ -2143,7 +2230,6 @@ class ConstInfo extends VariableLike
|
||||
class PropertyInfo extends VariableLike
|
||||
{
|
||||
public PropertyName $name;
|
||||
public ?Type $type;
|
||||
public ?Expr $defaultValue;
|
||||
public ?string $defaultValueString;
|
||||
public bool $isDocReadonly;
|
||||
@@ -2160,11 +2246,10 @@ class PropertyInfo extends VariableLike
|
||||
?int $phpVersionIdMinimumCompatibility
|
||||
) {
|
||||
$this->name = $name;
|
||||
$this->type = $type;
|
||||
$this->defaultValue = $defaultValue;
|
||||
$this->defaultValueString = $defaultValueString;
|
||||
$this->isDocReadonly = $isDocReadonly;
|
||||
parent::__construct($flags, $phpDocType, $link, $phpVersionIdMinimumCompatibility);
|
||||
parent::__construct($flags, $type, $phpDocType, $link, $phpVersionIdMinimumCompatibility);
|
||||
}
|
||||
|
||||
protected function getVariableTypeCode(): string
|
||||
@@ -2186,12 +2271,12 @@ class PropertyInfo extends VariableLike
|
||||
{
|
||||
$className = str_replace(["\\", "_"], ["-", "-"], $this->name->class->toLowerString());
|
||||
|
||||
return "$className.props." . strtolower(str_replace("_", "-", $this->name->property));
|
||||
return "$className.props." . strtolower(str_replace("_", "-", $this->getVariableLikeName()));
|
||||
}
|
||||
|
||||
protected function getFieldSynopsisName(): string
|
||||
{
|
||||
return $this->name->property;
|
||||
return $this->getVariableLikeName();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2213,7 +2298,7 @@ class PropertyInfo extends VariableLike
|
||||
public function getDeclaration(iterable $allConstInfos): string {
|
||||
$code = "\n";
|
||||
|
||||
$propertyName = $this->name->property;
|
||||
$propertyName = $this->getVariableLikeName();
|
||||
|
||||
if ($this->defaultValue === null) {
|
||||
$defaultValue = EvaluatedValue::null();
|
||||
@@ -2225,47 +2310,7 @@ class PropertyInfo extends VariableLike
|
||||
}
|
||||
}
|
||||
|
||||
$typeCode = "";
|
||||
if ($this->type) {
|
||||
$arginfoType = $this->type->toArginfoType();
|
||||
if ($arginfoType->hasClassType()) {
|
||||
if (count($arginfoType->classTypes) >= 2) {
|
||||
foreach ($arginfoType->classTypes as $classType) {
|
||||
$escapedClassName = $classType->toEscapedName();
|
||||
$varEscapedClassName = $classType->toVarEscapedName();
|
||||
$code .= "\tzend_string *property_{$propertyName}_class_{$varEscapedClassName} = zend_string_init(\"{$escapedClassName}\", sizeof(\"{$escapedClassName}\") - 1, 1);\n";
|
||||
}
|
||||
|
||||
$classTypeCount = count($arginfoType->classTypes);
|
||||
$code .= "\tzend_type_list *property_{$propertyName}_type_list = malloc(ZEND_TYPE_LIST_SIZE($classTypeCount));\n";
|
||||
$code .= "\tproperty_{$propertyName}_type_list->num_types = $classTypeCount;\n";
|
||||
|
||||
foreach ($arginfoType->classTypes as $k => $classType) {
|
||||
$escapedClassName = $classType->toEscapedName();
|
||||
$code .= "\tproperty_{$propertyName}_type_list->types[$k] = (zend_type) ZEND_TYPE_INIT_CLASS(property_{$propertyName}_class_{$escapedClassName}, 0, 0);\n";
|
||||
}
|
||||
|
||||
$typeMaskCode = $this->type->toArginfoType()->toTypeMask();
|
||||
|
||||
if ($this->type->isIntersection) {
|
||||
$code .= "\tzend_type property_{$propertyName}_type = ZEND_TYPE_INIT_INTERSECTION(property_{$propertyName}_type_list, $typeMaskCode);\n";
|
||||
} else {
|
||||
$code .= "\tzend_type property_{$propertyName}_type = ZEND_TYPE_INIT_UNION(property_{$propertyName}_type_list, $typeMaskCode);\n";
|
||||
}
|
||||
$typeCode = "property_{$propertyName}_type";
|
||||
} else {
|
||||
$escapedClassName = $arginfoType->classTypes[0]->toEscapedName();
|
||||
$varEscapedClassName = $arginfoType->classTypes[0]->toVarEscapedName();
|
||||
$code .= "\tzend_string *property_{$propertyName}_class_{$varEscapedClassName} = zend_string_init(\"{$escapedClassName}\", sizeof(\"{$escapedClassName}\")-1, 1);\n";
|
||||
|
||||
$typeCode = "(zend_type) ZEND_TYPE_INIT_CLASS(property_{$propertyName}_class_{$varEscapedClassName}, 0, " . $arginfoType->toTypeMask() . ")";
|
||||
}
|
||||
} else {
|
||||
$typeCode = "(zend_type) ZEND_TYPE_INIT_MASK(" . $arginfoType->toTypeMask() . ")";
|
||||
}
|
||||
}
|
||||
|
||||
$zvalName = "property_{$this->name->property}_default_value";
|
||||
$zvalName = "property_{$propertyName}_default_value";
|
||||
if ($this->defaultValue === null && $this->type !== null) {
|
||||
$code .= "\tzval $zvalName;\n\tZVAL_UNDEF(&$zvalName);\n";
|
||||
} else {
|
||||
@@ -2276,6 +2321,7 @@ class PropertyInfo extends VariableLike
|
||||
$nameCode = "property_{$propertyName}_name";
|
||||
|
||||
if ($this->type !== null) {
|
||||
$typeCode = $this->getTypeCode($propertyName, $code);
|
||||
$template = "\tzend_declare_typed_property(class_entry, $nameCode, &$zvalName, %s, NULL, $typeCode);\n";
|
||||
} else {
|
||||
$template = "\tzend_declare_property_ex(class_entry, $nameCode, &$zvalName, %s, NULL);\n";
|
||||
@@ -2325,16 +2371,6 @@ class PropertyInfo extends VariableLike
|
||||
}
|
||||
}
|
||||
|
||||
protected function addTypeToFieldSynopsis(DOMDocument $doc, DOMElement $fieldsynopsisElement): void
|
||||
{
|
||||
$type = $this->phpDocType ?? $this->type;
|
||||
|
||||
if ($type) {
|
||||
$fieldsynopsisElement->appendChild(new DOMText("\n "));
|
||||
$fieldsynopsisElement->appendChild($type->getTypeForDoc($doc));
|
||||
}
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
if ($this->type) {
|
||||
@@ -2662,11 +2698,14 @@ class ClassInfo {
|
||||
}
|
||||
}
|
||||
|
||||
$php83Flags = $php82Flags;
|
||||
|
||||
return [
|
||||
PHP_70_VERSION_ID => $php70Flags,
|
||||
PHP_80_VERSION_ID => $php80Flags,
|
||||
PHP_81_VERSION_ID => $php81Flags,
|
||||
PHP_82_VERSION_ID => $php82Flags,
|
||||
PHP_83_VERSION_ID => $php83Flags,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3416,6 +3455,7 @@ function parseConstLike(
|
||||
ConstOrClassConstName $name,
|
||||
Node\Const_ $const,
|
||||
int $flags,
|
||||
?Node $type,
|
||||
?DocComment $docComment,
|
||||
?string $cond,
|
||||
?int $phpVersionIdMinimumCompatibility
|
||||
@@ -3439,7 +3479,7 @@ function parseConstLike(
|
||||
}
|
||||
}
|
||||
|
||||
if ($phpDocType === null) {
|
||||
if ($type === null && $phpDocType === null) {
|
||||
throw new Exception("Missing type for constant " . $name->__toString());
|
||||
}
|
||||
|
||||
@@ -3448,7 +3488,8 @@ function parseConstLike(
|
||||
$flags,
|
||||
$const->value,
|
||||
$prettyPrinter->prettyPrintExpr($const->value),
|
||||
Type::fromString($phpDocType),
|
||||
$type ? Type::fromNode($type) : null,
|
||||
$phpDocType ? Type::fromString($phpDocType) : null,
|
||||
$deprecated,
|
||||
$cond,
|
||||
$cValue,
|
||||
@@ -3686,6 +3727,7 @@ function handleStatements(FileInfo $fileInfo, array $stmts, PrettyPrinterAbstrac
|
||||
new ConstName($const->namespacedName, $const->name->toString()),
|
||||
$const,
|
||||
0,
|
||||
null,
|
||||
$stmt->getDocComment(),
|
||||
$cond,
|
||||
$fileInfo->generateLegacyArginfoForPhpVersionId
|
||||
@@ -3729,6 +3771,7 @@ function handleStatements(FileInfo $fileInfo, array $stmts, PrettyPrinterAbstrac
|
||||
new ClassConstName($className, $const->name->toString()),
|
||||
$const,
|
||||
$classStmt->flags,
|
||||
$classStmt->type,
|
||||
$classStmt->getDocComment(),
|
||||
$cond,
|
||||
$fileInfo->generateLegacyArginfoForPhpVersionId
|
||||
@@ -3817,7 +3860,8 @@ function parseStubFile(string $code): FileInfo {
|
||||
if ($tag->value && !in_array((int) $tag->value, ALL_PHP_VERSION_IDS, true)) {
|
||||
throw new Exception(
|
||||
"Legacy PHP version must be one of: \"" . PHP_70_VERSION_ID . "\" (PHP 7.0), \"" . PHP_80_VERSION_ID . "\" (PHP 8.0), " .
|
||||
"\"" . PHP_81_VERSION_ID . "\" (PHP 8.1), \"" . PHP_82_VERSION_ID . "\" (PHP 8.2), \"" . $tag->value . "\" provided"
|
||||
"\"" . PHP_81_VERSION_ID . "\" (PHP 8.1), \"" . PHP_82_VERSION_ID . "\" (PHP 8.2), \"" . PHP_83_VERSION_ID . "\" (PHP 8.3), " .
|
||||
"\"" . $tag->value . "\" provided"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
8
ext/date/php_date_arginfo.h
generated
8
ext/date/php_date_arginfo.h
generated
@@ -1083,31 +1083,31 @@ static zend_class_entry *register_class_DatePeriod(zend_class_entry *class_entry
|
||||
zend_declare_class_constant_ex(class_entry, const_INCLUDE_END_DATE_name, &const_INCLUDE_END_DATE_value, ZEND_ACC_PUBLIC, NULL);
|
||||
zend_string_release(const_INCLUDE_END_DATE_name);
|
||||
|
||||
zend_string *property_start_class_DateTimeInterface = zend_string_init("DateTimeInterface", sizeof("DateTimeInterface")-1, 1);
|
||||
zval property_start_default_value;
|
||||
ZVAL_UNDEF(&property_start_default_value);
|
||||
zend_string *property_start_name = zend_string_init("start", sizeof("start") - 1, 1);
|
||||
zend_string *property_start_class_DateTimeInterface = zend_string_init("DateTimeInterface", sizeof("DateTimeInterface")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_start_name, &property_start_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_start_class_DateTimeInterface, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_start_name);
|
||||
|
||||
zend_string *property_current_class_DateTimeInterface = zend_string_init("DateTimeInterface", sizeof("DateTimeInterface")-1, 1);
|
||||
zval property_current_default_value;
|
||||
ZVAL_UNDEF(&property_current_default_value);
|
||||
zend_string *property_current_name = zend_string_init("current", sizeof("current") - 1, 1);
|
||||
zend_string *property_current_class_DateTimeInterface = zend_string_init("DateTimeInterface", sizeof("DateTimeInterface")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_current_name, &property_current_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_current_class_DateTimeInterface, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_current_name);
|
||||
|
||||
zend_string *property_end_class_DateTimeInterface = zend_string_init("DateTimeInterface", sizeof("DateTimeInterface")-1, 1);
|
||||
zval property_end_default_value;
|
||||
ZVAL_UNDEF(&property_end_default_value);
|
||||
zend_string *property_end_name = zend_string_init("end", sizeof("end") - 1, 1);
|
||||
zend_string *property_end_class_DateTimeInterface = zend_string_init("DateTimeInterface", sizeof("DateTimeInterface")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_end_name, &property_end_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_end_class_DateTimeInterface, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_end_name);
|
||||
|
||||
zend_string *property_interval_class_DateInterval = zend_string_init("DateInterval", sizeof("DateInterval")-1, 1);
|
||||
zval property_interval_default_value;
|
||||
ZVAL_UNDEF(&property_interval_default_value);
|
||||
zend_string *property_interval_name = zend_string_init("interval", sizeof("interval") - 1, 1);
|
||||
zend_string *property_interval_class_DateInterval = zend_string_init("DateInterval", sizeof("DateInterval")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_interval_name, &property_interval_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_interval_class_DateInterval, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_interval_name);
|
||||
|
||||
|
||||
54
ext/dom/php_dom_arginfo.h
generated
54
ext/dom/php_dom_arginfo.h
generated
@@ -956,17 +956,17 @@ static zend_class_entry *register_class_DOMDocumentType(zend_class_entry *class_
|
||||
zend_declare_typed_property(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
|
||||
zend_string_release(property_name_name);
|
||||
|
||||
zend_string *property_entities_class_DOMNamedNodeMap = zend_string_init("DOMNamedNodeMap", sizeof("DOMNamedNodeMap")-1, 1);
|
||||
zval property_entities_default_value;
|
||||
ZVAL_UNDEF(&property_entities_default_value);
|
||||
zend_string *property_entities_name = zend_string_init("entities", sizeof("entities") - 1, 1);
|
||||
zend_string *property_entities_class_DOMNamedNodeMap = zend_string_init("DOMNamedNodeMap", sizeof("DOMNamedNodeMap")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_entities_name, &property_entities_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_entities_class_DOMNamedNodeMap, 0, 0));
|
||||
zend_string_release(property_entities_name);
|
||||
|
||||
zend_string *property_notations_class_DOMNamedNodeMap = zend_string_init("DOMNamedNodeMap", sizeof("DOMNamedNodeMap")-1, 1);
|
||||
zval property_notations_default_value;
|
||||
ZVAL_UNDEF(&property_notations_default_value);
|
||||
zend_string *property_notations_name = zend_string_init("notations", sizeof("notations") - 1, 1);
|
||||
zend_string *property_notations_class_DOMNamedNodeMap = zend_string_init("DOMNamedNodeMap", sizeof("DOMNamedNodeMap")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_notations_name, &property_notations_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_notations_class_DOMNamedNodeMap, 0, 0));
|
||||
zend_string_release(property_notations_name);
|
||||
|
||||
@@ -1057,59 +1057,59 @@ static zend_class_entry *register_class_DOMNode(void)
|
||||
zend_declare_typed_property(class_entry, property_nodeType_name, &property_nodeType_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(property_nodeType_name);
|
||||
|
||||
zend_string *property_parentNode_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zval property_parentNode_default_value;
|
||||
ZVAL_UNDEF(&property_parentNode_default_value);
|
||||
zend_string *property_parentNode_name = zend_string_init("parentNode", sizeof("parentNode") - 1, 1);
|
||||
zend_string *property_parentNode_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_parentNode_name, &property_parentNode_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_parentNode_class_DOMNode, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_parentNode_name);
|
||||
|
||||
zend_string *property_childNodes_class_DOMNodeList = zend_string_init("DOMNodeList", sizeof("DOMNodeList")-1, 1);
|
||||
zval property_childNodes_default_value;
|
||||
ZVAL_UNDEF(&property_childNodes_default_value);
|
||||
zend_string *property_childNodes_name = zend_string_init("childNodes", sizeof("childNodes") - 1, 1);
|
||||
zend_string *property_childNodes_class_DOMNodeList = zend_string_init("DOMNodeList", sizeof("DOMNodeList")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_childNodes_name, &property_childNodes_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_childNodes_class_DOMNodeList, 0, 0));
|
||||
zend_string_release(property_childNodes_name);
|
||||
|
||||
zend_string *property_firstChild_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zval property_firstChild_default_value;
|
||||
ZVAL_UNDEF(&property_firstChild_default_value);
|
||||
zend_string *property_firstChild_name = zend_string_init("firstChild", sizeof("firstChild") - 1, 1);
|
||||
zend_string *property_firstChild_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_firstChild_name, &property_firstChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_firstChild_class_DOMNode, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_firstChild_name);
|
||||
|
||||
zend_string *property_lastChild_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zval property_lastChild_default_value;
|
||||
ZVAL_UNDEF(&property_lastChild_default_value);
|
||||
zend_string *property_lastChild_name = zend_string_init("lastChild", sizeof("lastChild") - 1, 1);
|
||||
zend_string *property_lastChild_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_lastChild_name, &property_lastChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_lastChild_class_DOMNode, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_lastChild_name);
|
||||
|
||||
zend_string *property_previousSibling_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zval property_previousSibling_default_value;
|
||||
ZVAL_UNDEF(&property_previousSibling_default_value);
|
||||
zend_string *property_previousSibling_name = zend_string_init("previousSibling", sizeof("previousSibling") - 1, 1);
|
||||
zend_string *property_previousSibling_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_previousSibling_name, &property_previousSibling_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_previousSibling_class_DOMNode, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_previousSibling_name);
|
||||
|
||||
zend_string *property_nextSibling_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zval property_nextSibling_default_value;
|
||||
ZVAL_UNDEF(&property_nextSibling_default_value);
|
||||
zend_string *property_nextSibling_name = zend_string_init("nextSibling", sizeof("nextSibling") - 1, 1);
|
||||
zend_string *property_nextSibling_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_nextSibling_name, &property_nextSibling_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_nextSibling_class_DOMNode, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_nextSibling_name);
|
||||
|
||||
zend_string *property_attributes_class_DOMNamedNodeMap = zend_string_init("DOMNamedNodeMap", sizeof("DOMNamedNodeMap")-1, 1);
|
||||
zval property_attributes_default_value;
|
||||
ZVAL_UNDEF(&property_attributes_default_value);
|
||||
zend_string *property_attributes_name = zend_string_init("attributes", sizeof("attributes") - 1, 1);
|
||||
zend_string *property_attributes_class_DOMNamedNodeMap = zend_string_init("DOMNamedNodeMap", sizeof("DOMNamedNodeMap")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_attributes_name, &property_attributes_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_attributes_class_DOMNamedNodeMap, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_attributes_name);
|
||||
|
||||
zend_string *property_ownerDocument_class_DOMDocument = zend_string_init("DOMDocument", sizeof("DOMDocument")-1, 1);
|
||||
zval property_ownerDocument_default_value;
|
||||
ZVAL_UNDEF(&property_ownerDocument_default_value);
|
||||
zend_string *property_ownerDocument_name = zend_string_init("ownerDocument", sizeof("ownerDocument") - 1, 1);
|
||||
zend_string *property_ownerDocument_class_DOMDocument = zend_string_init("DOMDocument", sizeof("DOMDocument")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_ownerDocument_name, &property_ownerDocument_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_ownerDocument_class_DOMDocument, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_ownerDocument_name);
|
||||
|
||||
@@ -1190,17 +1190,17 @@ static zend_class_entry *register_class_DOMNameSpaceNode(void)
|
||||
zend_declare_typed_property(class_entry, property_namespaceURI_name, &property_namespaceURI_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING|MAY_BE_NULL));
|
||||
zend_string_release(property_namespaceURI_name);
|
||||
|
||||
zend_string *property_ownerDocument_class_DOMDocument = zend_string_init("DOMDocument", sizeof("DOMDocument")-1, 1);
|
||||
zval property_ownerDocument_default_value;
|
||||
ZVAL_UNDEF(&property_ownerDocument_default_value);
|
||||
zend_string *property_ownerDocument_name = zend_string_init("ownerDocument", sizeof("ownerDocument") - 1, 1);
|
||||
zend_string *property_ownerDocument_class_DOMDocument = zend_string_init("DOMDocument", sizeof("DOMDocument")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_ownerDocument_name, &property_ownerDocument_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_ownerDocument_class_DOMDocument, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_ownerDocument_name);
|
||||
|
||||
zend_string *property_parentNode_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zval property_parentNode_default_value;
|
||||
ZVAL_UNDEF(&property_parentNode_default_value);
|
||||
zend_string *property_parentNode_name = zend_string_init("parentNode", sizeof("parentNode") - 1, 1);
|
||||
zend_string *property_parentNode_class_DOMNode = zend_string_init("DOMNode", sizeof("DOMNode")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_parentNode_name, &property_parentNode_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_parentNode_class_DOMNode, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_parentNode_name);
|
||||
|
||||
@@ -1225,17 +1225,17 @@ static zend_class_entry *register_class_DOMDocumentFragment(zend_class_entry *cl
|
||||
class_entry = zend_register_internal_class_ex(&ce, class_entry_DOMNode);
|
||||
zend_class_implements(class_entry, 1, class_entry_DOMParentNode);
|
||||
|
||||
zend_string *property_firstElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_firstElementChild_default_value;
|
||||
ZVAL_UNDEF(&property_firstElementChild_default_value);
|
||||
zend_string *property_firstElementChild_name = zend_string_init("firstElementChild", sizeof("firstElementChild") - 1, 1);
|
||||
zend_string *property_firstElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_firstElementChild_name, &property_firstElementChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_firstElementChild_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_firstElementChild_name);
|
||||
|
||||
zend_string *property_lastElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_lastElementChild_default_value;
|
||||
ZVAL_UNDEF(&property_lastElementChild_default_value);
|
||||
zend_string *property_lastElementChild_name = zend_string_init("lastElementChild", sizeof("lastElementChild") - 1, 1);
|
||||
zend_string *property_lastElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_lastElementChild_name, &property_lastElementChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_lastElementChild_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_lastElementChild_name);
|
||||
|
||||
@@ -1285,17 +1285,17 @@ static zend_class_entry *register_class_DOMCharacterData(zend_class_entry *class
|
||||
zend_declare_typed_property(class_entry, property_length_name, &property_length_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(property_length_name);
|
||||
|
||||
zend_string *property_previousElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_previousElementSibling_default_value;
|
||||
ZVAL_UNDEF(&property_previousElementSibling_default_value);
|
||||
zend_string *property_previousElementSibling_name = zend_string_init("previousElementSibling", sizeof("previousElementSibling") - 1, 1);
|
||||
zend_string *property_previousElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_previousElementSibling_name, &property_previousElementSibling_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_previousElementSibling_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_previousElementSibling_name);
|
||||
|
||||
zend_string *property_nextElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_nextElementSibling_default_value;
|
||||
ZVAL_UNDEF(&property_nextElementSibling_default_value);
|
||||
zend_string *property_nextElementSibling_name = zend_string_init("nextElementSibling", sizeof("nextElementSibling") - 1, 1);
|
||||
zend_string *property_nextElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_nextElementSibling_name, &property_nextElementSibling_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_nextElementSibling_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_nextElementSibling_name);
|
||||
|
||||
@@ -1327,10 +1327,10 @@ static zend_class_entry *register_class_DOMAttr(zend_class_entry *class_entry_DO
|
||||
zend_declare_typed_property(class_entry, property_value_name, &property_value_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
|
||||
zend_string_release(property_value_name);
|
||||
|
||||
zend_string *property_ownerElement_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_ownerElement_default_value;
|
||||
ZVAL_UNDEF(&property_ownerElement_default_value);
|
||||
zend_string *property_ownerElement_name = zend_string_init("ownerElement", sizeof("ownerElement") - 1, 1);
|
||||
zend_string *property_ownerElement_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_ownerElement_name, &property_ownerElement_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_ownerElement_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_ownerElement_name);
|
||||
|
||||
@@ -1363,17 +1363,17 @@ static zend_class_entry *register_class_DOMElement(zend_class_entry *class_entry
|
||||
zend_declare_typed_property(class_entry, property_schemaTypeInfo_name, &property_schemaTypeInfo_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
|
||||
zend_string_release(property_schemaTypeInfo_name);
|
||||
|
||||
zend_string *property_firstElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_firstElementChild_default_value;
|
||||
ZVAL_UNDEF(&property_firstElementChild_default_value);
|
||||
zend_string *property_firstElementChild_name = zend_string_init("firstElementChild", sizeof("firstElementChild") - 1, 1);
|
||||
zend_string *property_firstElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_firstElementChild_name, &property_firstElementChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_firstElementChild_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_firstElementChild_name);
|
||||
|
||||
zend_string *property_lastElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_lastElementChild_default_value;
|
||||
ZVAL_UNDEF(&property_lastElementChild_default_value);
|
||||
zend_string *property_lastElementChild_name = zend_string_init("lastElementChild", sizeof("lastElementChild") - 1, 1);
|
||||
zend_string *property_lastElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_lastElementChild_name, &property_lastElementChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_lastElementChild_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_lastElementChild_name);
|
||||
|
||||
@@ -1383,17 +1383,17 @@ static zend_class_entry *register_class_DOMElement(zend_class_entry *class_entry
|
||||
zend_declare_typed_property(class_entry, property_childElementCount_name, &property_childElementCount_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(property_childElementCount_name);
|
||||
|
||||
zend_string *property_previousElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_previousElementSibling_default_value;
|
||||
ZVAL_UNDEF(&property_previousElementSibling_default_value);
|
||||
zend_string *property_previousElementSibling_name = zend_string_init("previousElementSibling", sizeof("previousElementSibling") - 1, 1);
|
||||
zend_string *property_previousElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_previousElementSibling_name, &property_previousElementSibling_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_previousElementSibling_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_previousElementSibling_name);
|
||||
|
||||
zend_string *property_nextElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_nextElementSibling_default_value;
|
||||
ZVAL_UNDEF(&property_nextElementSibling_default_value);
|
||||
zend_string *property_nextElementSibling_name = zend_string_init("nextElementSibling", sizeof("nextElementSibling") - 1, 1);
|
||||
zend_string *property_nextElementSibling_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_nextElementSibling_name, &property_nextElementSibling_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_nextElementSibling_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_nextElementSibling_name);
|
||||
|
||||
@@ -1408,24 +1408,24 @@ static zend_class_entry *register_class_DOMDocument(zend_class_entry *class_entr
|
||||
class_entry = zend_register_internal_class_ex(&ce, class_entry_DOMNode);
|
||||
zend_class_implements(class_entry, 1, class_entry_DOMParentNode);
|
||||
|
||||
zend_string *property_doctype_class_DOMDocumentType = zend_string_init("DOMDocumentType", sizeof("DOMDocumentType")-1, 1);
|
||||
zval property_doctype_default_value;
|
||||
ZVAL_UNDEF(&property_doctype_default_value);
|
||||
zend_string *property_doctype_name = zend_string_init("doctype", sizeof("doctype") - 1, 1);
|
||||
zend_string *property_doctype_class_DOMDocumentType = zend_string_init("DOMDocumentType", sizeof("DOMDocumentType")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_doctype_name, &property_doctype_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_doctype_class_DOMDocumentType, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_doctype_name);
|
||||
|
||||
zend_string *property_implementation_class_DOMImplementation = zend_string_init("DOMImplementation", sizeof("DOMImplementation")-1, 1);
|
||||
zval property_implementation_default_value;
|
||||
ZVAL_UNDEF(&property_implementation_default_value);
|
||||
zend_string *property_implementation_name = zend_string_init("implementation", sizeof("implementation") - 1, 1);
|
||||
zend_string *property_implementation_class_DOMImplementation = zend_string_init("DOMImplementation", sizeof("DOMImplementation")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_implementation_name, &property_implementation_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_implementation_class_DOMImplementation, 0, 0));
|
||||
zend_string_release(property_implementation_name);
|
||||
|
||||
zend_string *property_documentElement_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_documentElement_default_value;
|
||||
ZVAL_UNDEF(&property_documentElement_default_value);
|
||||
zend_string *property_documentElement_name = zend_string_init("documentElement", sizeof("documentElement") - 1, 1);
|
||||
zend_string *property_documentElement_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_documentElement_name, &property_documentElement_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_documentElement_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_documentElement_name);
|
||||
|
||||
@@ -1525,17 +1525,17 @@ static zend_class_entry *register_class_DOMDocument(zend_class_entry *class_entr
|
||||
zend_declare_typed_property(class_entry, property_substituteEntities_name, &property_substituteEntities_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_BOOL));
|
||||
zend_string_release(property_substituteEntities_name);
|
||||
|
||||
zend_string *property_firstElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_firstElementChild_default_value;
|
||||
ZVAL_UNDEF(&property_firstElementChild_default_value);
|
||||
zend_string *property_firstElementChild_name = zend_string_init("firstElementChild", sizeof("firstElementChild") - 1, 1);
|
||||
zend_string *property_firstElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_firstElementChild_name, &property_firstElementChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_firstElementChild_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_firstElementChild_name);
|
||||
|
||||
zend_string *property_lastElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zval property_lastElementChild_default_value;
|
||||
ZVAL_UNDEF(&property_lastElementChild_default_value);
|
||||
zend_string *property_lastElementChild_name = zend_string_init("lastElementChild", sizeof("lastElementChild") - 1, 1);
|
||||
zend_string *property_lastElementChild_class_DOMElement = zend_string_init("DOMElement", sizeof("DOMElement")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_lastElementChild_name, &property_lastElementChild_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_lastElementChild_class_DOMElement, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_lastElementChild_name);
|
||||
|
||||
@@ -1707,10 +1707,10 @@ static zend_class_entry *register_class_DOMXPath(void)
|
||||
class_entry = zend_register_internal_class_ex(&ce, NULL);
|
||||
class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
|
||||
|
||||
zend_string *property_document_class_DOMDocument = zend_string_init("DOMDocument", sizeof("DOMDocument")-1, 1);
|
||||
zval property_document_default_value;
|
||||
ZVAL_UNDEF(&property_document_default_value);
|
||||
zend_string *property_document_name = zend_string_init("document", sizeof("document") - 1, 1);
|
||||
zend_string *property_document_class_DOMDocument = zend_string_init("DOMDocument", sizeof("DOMDocument")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_document_name, &property_document_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_document_class_DOMDocument, 0, 0));
|
||||
zend_string_release(property_document_name);
|
||||
|
||||
|
||||
2
ext/random/random_arginfo.h
generated
2
ext/random/random_arginfo.h
generated
@@ -339,10 +339,10 @@ static zend_class_entry *register_class_Random_Randomizer(void)
|
||||
class_entry = zend_register_internal_class_ex(&ce, NULL);
|
||||
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
|
||||
|
||||
zend_string *property_engine_class_Random_Engine = zend_string_init("Random\\Engine", sizeof("Random\\Engine")-1, 1);
|
||||
zval property_engine_default_value;
|
||||
ZVAL_UNDEF(&property_engine_default_value);
|
||||
zend_string *property_engine_name = zend_string_init("engine", sizeof("engine") - 1, 1);
|
||||
zend_string *property_engine_class_Random_Engine = zend_string_init("Random\\Engine", sizeof("Random\\Engine")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_engine_name, &property_engine_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_engine_class_Random_Engine, 0, 0));
|
||||
zend_string_release(property_engine_name);
|
||||
|
||||
|
||||
4
ext/soap/soap_arginfo.h
generated
4
ext/soap/soap_arginfo.h
generated
@@ -485,10 +485,10 @@ static zend_class_entry *register_class_SoapServer(void)
|
||||
INIT_CLASS_ENTRY(ce, "SoapServer", class_SoapServer_methods);
|
||||
class_entry = zend_register_internal_class_ex(&ce, NULL);
|
||||
|
||||
zend_string *property___soap_fault_class_SoapFault = zend_string_init("SoapFault", sizeof("SoapFault")-1, 1);
|
||||
zval property___soap_fault_default_value;
|
||||
ZVAL_NULL(&property___soap_fault_default_value);
|
||||
zend_string *property___soap_fault_name = zend_string_init("__soap_fault", sizeof("__soap_fault") - 1, 1);
|
||||
zend_string *property___soap_fault_class_SoapFault = zend_string_init("SoapFault", sizeof("SoapFault")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property___soap_fault_name, &property___soap_fault_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property___soap_fault_class_SoapFault, 0, MAY_BE_NULL));
|
||||
zend_string_release(property___soap_fault_name);
|
||||
|
||||
@@ -688,10 +688,10 @@ static zend_class_entry *register_class_SoapClient(void)
|
||||
zend_declare_typed_property(class_entry, property___default_headers_name, &property___default_headers_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY|MAY_BE_NULL));
|
||||
zend_string_release(property___default_headers_name);
|
||||
|
||||
zend_string *property___soap_fault_class_SoapFault = zend_string_init("SoapFault", sizeof("SoapFault")-1, 1);
|
||||
zval property___soap_fault_default_value;
|
||||
ZVAL_NULL(&property___soap_fault_default_value);
|
||||
zend_string *property___soap_fault_name = zend_string_init("__soap_fault", sizeof("__soap_fault") - 1, 1);
|
||||
zend_string *property___soap_fault_class_SoapFault = zend_string_init("SoapFault", sizeof("SoapFault")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property___soap_fault_name, &property___soap_fault_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property___soap_fault_class_SoapFault, 0, MAY_BE_NULL));
|
||||
zend_string_release(property___soap_fault_name);
|
||||
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace {
|
||||
|
||||
/** @alias _ZendTestClassAlias */
|
||||
class _ZendTestClass implements _ZendTestInterface {
|
||||
public const mixed TYPED_CLASS_CONST1 = [];
|
||||
public const int|array TYPED_CLASS_CONST2 = 42;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue 1
|
||||
*/
|
||||
public const int|string TYPED_CLASS_CONST3 = UNKNOWN;
|
||||
|
||||
/** @var mixed */
|
||||
public static $_StaticProp;
|
||||
public static int $staticIntProp = 123;
|
||||
|
||||
48
ext/zend_test/test_arginfo.h
generated
48
ext/zend_test/test_arginfo.h
generated
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: c526a3e961501a511b210eab38bb961ca61bb258 */
|
||||
* Stub hash: 46e6d8be5504acb6ecbb722da4fabfcea4e8a354 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -468,6 +468,36 @@ static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_e
|
||||
zend_class_implements(class_entry, 1, class_entry__ZendTestInterface);
|
||||
zend_register_class_alias("_ZendTestClassAlias", class_entry);
|
||||
|
||||
zval const_TYPED_CLASS_CONST1_value;
|
||||
ZVAL_EMPTY_ARRAY(&const_TYPED_CLASS_CONST1_value);
|
||||
zend_string *const_TYPED_CLASS_CONST1_name = zend_string_init_interned("TYPED_CLASS_CONST1", sizeof("TYPED_CLASS_CONST1") - 1, 1);
|
||||
#if (PHP_VERSION_ID >= 80300)
|
||||
zend_declare_typed_class_constant(class_entry, const_TYPED_CLASS_CONST1_name, &const_TYPED_CLASS_CONST1_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
|
||||
#else
|
||||
zend_declare_class_constant_ex(class_entry, const_TYPED_CLASS_CONST1_name, &const_TYPED_CLASS_CONST1_value, ZEND_ACC_PUBLIC, NULL);
|
||||
#endif
|
||||
zend_string_release(const_TYPED_CLASS_CONST1_name);
|
||||
|
||||
zval const_TYPED_CLASS_CONST2_value;
|
||||
ZVAL_LONG(&const_TYPED_CLASS_CONST2_value, 42);
|
||||
zend_string *const_TYPED_CLASS_CONST2_name = zend_string_init_interned("TYPED_CLASS_CONST2", sizeof("TYPED_CLASS_CONST2") - 1, 1);
|
||||
#if (PHP_VERSION_ID >= 80300)
|
||||
zend_declare_typed_class_constant(class_entry, const_TYPED_CLASS_CONST2_name, &const_TYPED_CLASS_CONST2_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_ARRAY));
|
||||
#else
|
||||
zend_declare_class_constant_ex(class_entry, const_TYPED_CLASS_CONST2_name, &const_TYPED_CLASS_CONST2_value, ZEND_ACC_PUBLIC, NULL);
|
||||
#endif
|
||||
zend_string_release(const_TYPED_CLASS_CONST2_name);
|
||||
|
||||
zval const_TYPED_CLASS_CONST3_value;
|
||||
ZVAL_LONG(&const_TYPED_CLASS_CONST3_value, 1);
|
||||
zend_string *const_TYPED_CLASS_CONST3_name = zend_string_init_interned("TYPED_CLASS_CONST3", sizeof("TYPED_CLASS_CONST3") - 1, 1);
|
||||
#if (PHP_VERSION_ID >= 80300)
|
||||
zend_declare_typed_class_constant(class_entry, const_TYPED_CLASS_CONST3_name, &const_TYPED_CLASS_CONST3_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_STRING));
|
||||
#else
|
||||
zend_declare_class_constant_ex(class_entry, const_TYPED_CLASS_CONST3_name, &const_TYPED_CLASS_CONST3_value, ZEND_ACC_PUBLIC, NULL);
|
||||
#endif
|
||||
zend_string_release(const_TYPED_CLASS_CONST3_name);
|
||||
|
||||
zval property__StaticProp_default_value;
|
||||
ZVAL_NULL(&property__StaticProp_default_value);
|
||||
zend_string *property__StaticProp_name = zend_string_init("_StaticProp", sizeof("_StaticProp") - 1, 1);
|
||||
@@ -486,13 +516,16 @@ static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_e
|
||||
zend_declare_typed_property(class_entry, property_intProp_name, &property_intProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
|
||||
zend_string_release(property_intProp_name);
|
||||
|
||||
zend_string *property_classProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass")-1, 1);
|
||||
zval property_classProp_default_value;
|
||||
ZVAL_NULL(&property_classProp_default_value);
|
||||
zend_string *property_classProp_name = zend_string_init("classProp", sizeof("classProp") - 1, 1);
|
||||
zend_string *property_classProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_classProp_name, &property_classProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_classProp_class_stdClass, 0, MAY_BE_NULL));
|
||||
zend_string_release(property_classProp_name);
|
||||
|
||||
zval property_classUnionProp_default_value;
|
||||
ZVAL_NULL(&property_classUnionProp_default_value);
|
||||
zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
|
||||
zend_string *property_classUnionProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass") - 1, 1);
|
||||
zend_string *property_classUnionProp_class_Iterator = zend_string_init("Iterator", sizeof("Iterator") - 1, 1);
|
||||
zend_type_list *property_classUnionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
|
||||
@@ -500,12 +533,12 @@ static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_e
|
||||
property_classUnionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_stdClass, 0, 0);
|
||||
property_classUnionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Iterator, 0, 0);
|
||||
zend_type property_classUnionProp_type = ZEND_TYPE_INIT_UNION(property_classUnionProp_type_list, MAY_BE_NULL);
|
||||
zval property_classUnionProp_default_value;
|
||||
ZVAL_NULL(&property_classUnionProp_default_value);
|
||||
zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
|
||||
zend_declare_typed_property(class_entry, property_classUnionProp_name, &property_classUnionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classUnionProp_type);
|
||||
zend_string_release(property_classUnionProp_name);
|
||||
|
||||
zval property_classIntersectionProp_default_value;
|
||||
ZVAL_UNDEF(&property_classIntersectionProp_default_value);
|
||||
zend_string *property_classIntersectionProp_name = zend_string_init("classIntersectionProp", sizeof("classIntersectionProp") - 1, 1);
|
||||
zend_string *property_classIntersectionProp_class_Traversable = zend_string_init("Traversable", sizeof("Traversable") - 1, 1);
|
||||
zend_string *property_classIntersectionProp_class_Countable = zend_string_init("Countable", sizeof("Countable") - 1, 1);
|
||||
zend_type_list *property_classIntersectionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
|
||||
@@ -513,9 +546,6 @@ static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_e
|
||||
property_classIntersectionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classIntersectionProp_class_Traversable, 0, 0);
|
||||
property_classIntersectionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classIntersectionProp_class_Countable, 0, 0);
|
||||
zend_type property_classIntersectionProp_type = ZEND_TYPE_INIT_INTERSECTION(property_classIntersectionProp_type_list, 0);
|
||||
zval property_classIntersectionProp_default_value;
|
||||
ZVAL_UNDEF(&property_classIntersectionProp_default_value);
|
||||
zend_string *property_classIntersectionProp_name = zend_string_init("classIntersectionProp", sizeof("classIntersectionProp") - 1, 1);
|
||||
zend_declare_typed_property(class_entry, property_classIntersectionProp_name, &property_classIntersectionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classIntersectionProp_type);
|
||||
zend_string_release(property_classIntersectionProp_name);
|
||||
|
||||
@@ -789,10 +819,10 @@ static zend_class_entry *register_class_ZendTestNS2_Foo(void)
|
||||
INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2", "Foo", class_ZendTestNS2_Foo_methods);
|
||||
class_entry = zend_register_internal_class_ex(&ce, NULL);
|
||||
|
||||
zend_string *property_foo_class_ZendTestNS2_ZendSubNS_Foo = zend_string_init("ZendTestNS2\\ZendSubNS\\Foo", sizeof("ZendTestNS2\\ZendSubNS\\Foo")-1, 1);
|
||||
zval property_foo_default_value;
|
||||
ZVAL_UNDEF(&property_foo_default_value);
|
||||
zend_string *property_foo_name = zend_string_init("foo", sizeof("foo") - 1, 1);
|
||||
zend_string *property_foo_class_ZendTestNS2_ZendSubNS_Foo = zend_string_init("ZendTestNS2\\ZendSubNS\\Foo", sizeof("ZendTestNS2\\ZendSubNS\\Foo")-1, 1);
|
||||
zend_declare_typed_property(class_entry, property_foo_name, &property_foo_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_foo_class_ZendTestNS2_ZendSubNS_Foo, 0, 0));
|
||||
zend_string_release(property_foo_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user