1Union types 2----- 3<?php 4 5class Test { 6 public A&B $prop; 7} 8 9function test(A&B $a): A&B {} 10----- 11array( 12 0: Stmt_Class( 13 attrGroups: array( 14 ) 15 flags: 0 16 name: Identifier( 17 name: Test 18 ) 19 extends: null 20 implements: array( 21 ) 22 stmts: array( 23 0: Stmt_Property( 24 attrGroups: array( 25 ) 26 flags: PUBLIC (1) 27 type: IntersectionType( 28 types: array( 29 0: Name( 30 name: A 31 ) 32 1: Name( 33 name: B 34 ) 35 ) 36 ) 37 props: array( 38 0: PropertyItem( 39 name: VarLikeIdentifier( 40 name: prop 41 ) 42 default: null 43 ) 44 ) 45 hooks: array( 46 ) 47 ) 48 ) 49 ) 50 1: Stmt_Function( 51 attrGroups: array( 52 ) 53 byRef: false 54 name: Identifier( 55 name: test 56 ) 57 params: array( 58 0: Param( 59 attrGroups: array( 60 ) 61 flags: 0 62 type: IntersectionType( 63 types: array( 64 0: Name( 65 name: A 66 ) 67 1: Name( 68 name: B 69 ) 70 ) 71 ) 72 byRef: false 73 variadic: false 74 var: Expr_Variable( 75 name: a 76 ) 77 default: null 78 hooks: array( 79 ) 80 ) 81 ) 82 returnType: IntersectionType( 83 types: array( 84 0: Name( 85 name: A 86 ) 87 1: Name( 88 name: B 89 ) 90 ) 91 ) 92 stmts: array( 93 ) 94 ) 95) 96