Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 5fb285c0d0e3 |
children |
rev | line source |
---|---|
Chris@0 | 1 Variadic functions |
Chris@0 | 2 ----- |
Chris@0 | 3 <?php |
Chris@0 | 4 function test($a, ... $b) {} |
Chris@0 | 5 function test($a, &... $b) {} |
Chris@0 | 6 function test($a, Type ... $b) {} |
Chris@0 | 7 function test($a, Type &... $b) {} |
Chris@0 | 8 ----- |
Chris@0 | 9 array( |
Chris@0 | 10 0: Stmt_Function( |
Chris@0 | 11 byRef: false |
Chris@13 | 12 name: Identifier( |
Chris@13 | 13 name: test |
Chris@13 | 14 ) |
Chris@0 | 15 params: array( |
Chris@0 | 16 0: Param( |
Chris@0 | 17 type: null |
Chris@0 | 18 byRef: false |
Chris@0 | 19 variadic: false |
Chris@13 | 20 var: Expr_Variable( |
Chris@13 | 21 name: a |
Chris@13 | 22 ) |
Chris@0 | 23 default: null |
Chris@0 | 24 ) |
Chris@0 | 25 1: Param( |
Chris@0 | 26 type: null |
Chris@0 | 27 byRef: false |
Chris@0 | 28 variadic: true |
Chris@13 | 29 var: Expr_Variable( |
Chris@13 | 30 name: b |
Chris@13 | 31 ) |
Chris@0 | 32 default: null |
Chris@0 | 33 ) |
Chris@0 | 34 ) |
Chris@0 | 35 returnType: null |
Chris@0 | 36 stmts: array( |
Chris@0 | 37 ) |
Chris@0 | 38 ) |
Chris@0 | 39 1: Stmt_Function( |
Chris@0 | 40 byRef: false |
Chris@13 | 41 name: Identifier( |
Chris@13 | 42 name: test |
Chris@13 | 43 ) |
Chris@0 | 44 params: array( |
Chris@0 | 45 0: Param( |
Chris@0 | 46 type: null |
Chris@0 | 47 byRef: false |
Chris@0 | 48 variadic: false |
Chris@13 | 49 var: Expr_Variable( |
Chris@13 | 50 name: a |
Chris@13 | 51 ) |
Chris@0 | 52 default: null |
Chris@0 | 53 ) |
Chris@0 | 54 1: Param( |
Chris@0 | 55 type: null |
Chris@0 | 56 byRef: true |
Chris@0 | 57 variadic: true |
Chris@13 | 58 var: Expr_Variable( |
Chris@13 | 59 name: b |
Chris@13 | 60 ) |
Chris@0 | 61 default: null |
Chris@0 | 62 ) |
Chris@0 | 63 ) |
Chris@0 | 64 returnType: null |
Chris@0 | 65 stmts: array( |
Chris@0 | 66 ) |
Chris@0 | 67 ) |
Chris@0 | 68 2: Stmt_Function( |
Chris@0 | 69 byRef: false |
Chris@13 | 70 name: Identifier( |
Chris@13 | 71 name: test |
Chris@13 | 72 ) |
Chris@0 | 73 params: array( |
Chris@0 | 74 0: Param( |
Chris@0 | 75 type: null |
Chris@0 | 76 byRef: false |
Chris@0 | 77 variadic: false |
Chris@13 | 78 var: Expr_Variable( |
Chris@13 | 79 name: a |
Chris@13 | 80 ) |
Chris@0 | 81 default: null |
Chris@0 | 82 ) |
Chris@0 | 83 1: Param( |
Chris@0 | 84 type: Name( |
Chris@0 | 85 parts: array( |
Chris@0 | 86 0: Type |
Chris@0 | 87 ) |
Chris@0 | 88 ) |
Chris@0 | 89 byRef: false |
Chris@0 | 90 variadic: true |
Chris@13 | 91 var: Expr_Variable( |
Chris@13 | 92 name: b |
Chris@13 | 93 ) |
Chris@0 | 94 default: null |
Chris@0 | 95 ) |
Chris@0 | 96 ) |
Chris@0 | 97 returnType: null |
Chris@0 | 98 stmts: array( |
Chris@0 | 99 ) |
Chris@0 | 100 ) |
Chris@0 | 101 3: Stmt_Function( |
Chris@0 | 102 byRef: false |
Chris@13 | 103 name: Identifier( |
Chris@13 | 104 name: test |
Chris@13 | 105 ) |
Chris@0 | 106 params: array( |
Chris@0 | 107 0: Param( |
Chris@0 | 108 type: null |
Chris@0 | 109 byRef: false |
Chris@0 | 110 variadic: false |
Chris@13 | 111 var: Expr_Variable( |
Chris@13 | 112 name: a |
Chris@13 | 113 ) |
Chris@0 | 114 default: null |
Chris@0 | 115 ) |
Chris@0 | 116 1: Param( |
Chris@0 | 117 type: Name( |
Chris@0 | 118 parts: array( |
Chris@0 | 119 0: Type |
Chris@0 | 120 ) |
Chris@0 | 121 ) |
Chris@0 | 122 byRef: true |
Chris@0 | 123 variadic: true |
Chris@13 | 124 var: Expr_Variable( |
Chris@13 | 125 name: b |
Chris@13 | 126 ) |
Chris@0 | 127 default: null |
Chris@0 | 128 ) |
Chris@0 | 129 ) |
Chris@0 | 130 returnType: null |
Chris@0 | 131 stmts: array( |
Chris@0 | 132 ) |
Chris@0 | 133 ) |
Chris@13 | 134 ) |