xref: /PHP-8.3/Zend/zend_attributes.stub.php (revision 3906bccc)
1<?php
2
3/** @generate-class-entries */
4
5#[Attribute(Attribute::TARGET_CLASS)]
6final class Attribute
7{
8    /** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS */
9    const int TARGET_CLASS = UNKNOWN;
10    /** @cvalue ZEND_ATTRIBUTE_TARGET_FUNCTION */
11    const int TARGET_FUNCTION = UNKNOWN;
12    /** @cvalue ZEND_ATTRIBUTE_TARGET_METHOD */
13    const int TARGET_METHOD = UNKNOWN;
14    /** @cvalue ZEND_ATTRIBUTE_TARGET_PROPERTY */
15    const int TARGET_PROPERTY = UNKNOWN;
16    /** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS_CONST */
17    const int TARGET_CLASS_CONSTANT = UNKNOWN;
18    /** @cvalue ZEND_ATTRIBUTE_TARGET_PARAMETER */
19    const int TARGET_PARAMETER = UNKNOWN;
20    /** @cvalue ZEND_ATTRIBUTE_TARGET_ALL */
21    const int TARGET_ALL = UNKNOWN;
22    /**  @cvalue ZEND_ATTRIBUTE_IS_REPEATABLE */
23    const int IS_REPEATABLE = UNKNOWN;
24
25    public int $flags;
26
27    public function __construct(int $flags = Attribute::TARGET_ALL) {}
28}
29
30#[Attribute(Attribute::TARGET_METHOD)]
31final class ReturnTypeWillChange
32{
33    public function __construct() {}
34}
35
36#[Attribute(Attribute::TARGET_CLASS)]
37final class AllowDynamicProperties
38{
39    public function __construct() {}
40}
41
42/**
43 * @strict-properties
44 */
45#[Attribute(Attribute::TARGET_PARAMETER)]
46final class SensitiveParameter
47{
48    public function __construct() {}
49}
50
51/**
52 * @strict-properties
53 * @not-serializable
54 */
55final class SensitiveParameterValue
56{
57    private readonly mixed $value;
58
59    public function __construct(mixed $value) {}
60
61    public function getValue(): mixed {}
62
63    public function __debugInfo(): array {}
64}
65
66/**
67 * @strict-properties
68 */
69#[Attribute(Attribute::TARGET_METHOD)]
70final class Override
71{
72    public function __construct() {}
73}
74