1Property promotion 2----- 3<?php 4 5class Point { 6 public function __construct( 7 public float $x = 0.0, 8 protected array $y = [], 9 private string $z = 'hello', 10 public readonly int $a = 0, 11 public $h { set => $value; }, 12 public $g = 1 { get => 2; }, 13 ) {} 14} 15----- 16array( 17 0: Stmt_Class( 18 attrGroups: array( 19 ) 20 flags: 0 21 name: Identifier( 22 name: Point 23 ) 24 extends: null 25 implements: array( 26 ) 27 stmts: array( 28 0: Stmt_ClassMethod( 29 attrGroups: array( 30 ) 31 flags: PUBLIC (1) 32 byRef: false 33 name: Identifier( 34 name: __construct 35 ) 36 params: array( 37 0: Param( 38 attrGroups: array( 39 ) 40 flags: PUBLIC (1) 41 type: Identifier( 42 name: float 43 ) 44 byRef: false 45 variadic: false 46 var: Expr_Variable( 47 name: x 48 ) 49 default: Scalar_Float( 50 value: 0 51 ) 52 hooks: array( 53 ) 54 ) 55 1: Param( 56 attrGroups: array( 57 ) 58 flags: PROTECTED (2) 59 type: Identifier( 60 name: array 61 ) 62 byRef: false 63 variadic: false 64 var: Expr_Variable( 65 name: y 66 ) 67 default: Expr_Array( 68 items: array( 69 ) 70 ) 71 hooks: array( 72 ) 73 ) 74 2: Param( 75 attrGroups: array( 76 ) 77 flags: PRIVATE (4) 78 type: Identifier( 79 name: string 80 ) 81 byRef: false 82 variadic: false 83 var: Expr_Variable( 84 name: z 85 ) 86 default: Scalar_String( 87 value: hello 88 ) 89 hooks: array( 90 ) 91 ) 92 3: Param( 93 attrGroups: array( 94 ) 95 flags: PUBLIC | READONLY (65) 96 type: Identifier( 97 name: int 98 ) 99 byRef: false 100 variadic: false 101 var: Expr_Variable( 102 name: a 103 ) 104 default: Scalar_Int( 105 value: 0 106 ) 107 hooks: array( 108 ) 109 ) 110 4: Param( 111 attrGroups: array( 112 ) 113 flags: PUBLIC (1) 114 type: null 115 byRef: false 116 variadic: false 117 var: Expr_Variable( 118 name: h 119 ) 120 default: null 121 hooks: array( 122 0: PropertyHook( 123 attrGroups: array( 124 ) 125 flags: 0 126 byRef: false 127 name: Identifier( 128 name: set 129 ) 130 params: array( 131 ) 132 body: Expr_Variable( 133 name: value 134 ) 135 ) 136 ) 137 ) 138 5: Param( 139 attrGroups: array( 140 ) 141 flags: PUBLIC (1) 142 type: null 143 byRef: false 144 variadic: false 145 var: Expr_Variable( 146 name: g 147 ) 148 default: Scalar_Int( 149 value: 1 150 ) 151 hooks: array( 152 0: PropertyHook( 153 attrGroups: array( 154 ) 155 flags: 0 156 byRef: false 157 name: Identifier( 158 name: get 159 ) 160 params: array( 161 ) 162 body: Scalar_Int( 163 value: 2 164 ) 165 ) 166 ) 167 ) 168 ) 169 returnType: null 170 stmts: array( 171 ) 172 ) 173 ) 174 ) 175) 176