1Asymmetric visibility modifiers 2----- 3<?php 4 5class Test { 6 protected private(set) $a; 7 private public(set) $b; 8 protected(set) $c; 9 10 public function __construct( 11 protected private(set) $d, 12 private public(set) $e, 13 protected(set) $f, 14 ) {} 15} 16----- 17array( 18 0: Stmt_Class( 19 attrGroups: array( 20 ) 21 flags: 0 22 name: Identifier( 23 name: Test 24 ) 25 extends: null 26 implements: array( 27 ) 28 stmts: array( 29 0: Stmt_Property( 30 attrGroups: array( 31 ) 32 flags: PROTECTED | PRIVATE_SET (514) 33 type: null 34 props: array( 35 0: PropertyItem( 36 name: VarLikeIdentifier( 37 name: a 38 ) 39 default: null 40 ) 41 ) 42 hooks: array( 43 ) 44 ) 45 1: Stmt_Property( 46 attrGroups: array( 47 ) 48 flags: PRIVATE | PUBLIC_SET (132) 49 type: null 50 props: array( 51 0: PropertyItem( 52 name: VarLikeIdentifier( 53 name: b 54 ) 55 default: null 56 ) 57 ) 58 hooks: array( 59 ) 60 ) 61 2: Stmt_Property( 62 attrGroups: array( 63 ) 64 flags: PROTECTED_SET (256) 65 type: null 66 props: array( 67 0: PropertyItem( 68 name: VarLikeIdentifier( 69 name: c 70 ) 71 default: null 72 ) 73 ) 74 hooks: array( 75 ) 76 ) 77 3: Stmt_ClassMethod( 78 attrGroups: array( 79 ) 80 flags: PUBLIC (1) 81 byRef: false 82 name: Identifier( 83 name: __construct 84 ) 85 params: array( 86 0: Param( 87 attrGroups: array( 88 ) 89 flags: PROTECTED | PRIVATE_SET (514) 90 type: null 91 byRef: false 92 variadic: false 93 var: Expr_Variable( 94 name: d 95 ) 96 default: null 97 hooks: array( 98 ) 99 ) 100 1: Param( 101 attrGroups: array( 102 ) 103 flags: PRIVATE | PUBLIC_SET (132) 104 type: null 105 byRef: false 106 variadic: false 107 var: Expr_Variable( 108 name: e 109 ) 110 default: null 111 hooks: array( 112 ) 113 ) 114 2: Param( 115 attrGroups: array( 116 ) 117 flags: PROTECTED_SET (256) 118 type: null 119 byRef: false 120 variadic: false 121 var: Expr_Variable( 122 name: f 123 ) 124 default: null 125 hooks: array( 126 ) 127 ) 128 ) 129 returnType: null 130 stmts: array( 131 ) 132 ) 133 ) 134 ) 135) 136----- 137<?php 138class Test { 139 private(set) private(set) $x; 140 private(set) public(set) $x; 141} 142----- 143Multiple access type modifiers are not allowed from 3:18 to 3:29 144Multiple access type modifiers are not allowed from 4:18 to 4:28 145array( 146 0: Stmt_Class( 147 attrGroups: array( 148 ) 149 flags: 0 150 name: Identifier( 151 name: Test 152 ) 153 extends: null 154 implements: array( 155 ) 156 stmts: array( 157 0: Stmt_Property( 158 attrGroups: array( 159 ) 160 flags: PRIVATE_SET (512) 161 type: null 162 props: array( 163 0: PropertyItem( 164 name: VarLikeIdentifier( 165 name: x 166 ) 167 default: null 168 ) 169 ) 170 hooks: array( 171 ) 172 ) 173 1: Stmt_Property( 174 attrGroups: array( 175 ) 176 flags: PUBLIC_SET | PRIVATE_SET (640) 177 type: null 178 props: array( 179 0: PropertyItem( 180 name: VarLikeIdentifier( 181 name: x 182 ) 183 default: null 184 ) 185 ) 186 hooks: array( 187 ) 188 ) 189 ) 190 ) 191) 192