Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 5fb285c0d0e3 |
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@0 | 12 name: test |
Chris@0 | 13 params: array( |
Chris@0 | 14 0: Param( |
Chris@0 | 15 type: null |
Chris@0 | 16 byRef: false |
Chris@0 | 17 variadic: false |
Chris@0 | 18 name: a |
Chris@0 | 19 default: null |
Chris@0 | 20 ) |
Chris@0 | 21 1: Param( |
Chris@0 | 22 type: null |
Chris@0 | 23 byRef: false |
Chris@0 | 24 variadic: true |
Chris@0 | 25 name: b |
Chris@0 | 26 default: null |
Chris@0 | 27 ) |
Chris@0 | 28 ) |
Chris@0 | 29 returnType: null |
Chris@0 | 30 stmts: array( |
Chris@0 | 31 ) |
Chris@0 | 32 ) |
Chris@0 | 33 1: Stmt_Function( |
Chris@0 | 34 byRef: false |
Chris@0 | 35 name: test |
Chris@0 | 36 params: array( |
Chris@0 | 37 0: Param( |
Chris@0 | 38 type: null |
Chris@0 | 39 byRef: false |
Chris@0 | 40 variadic: false |
Chris@0 | 41 name: a |
Chris@0 | 42 default: null |
Chris@0 | 43 ) |
Chris@0 | 44 1: Param( |
Chris@0 | 45 type: null |
Chris@0 | 46 byRef: true |
Chris@0 | 47 variadic: true |
Chris@0 | 48 name: b |
Chris@0 | 49 default: null |
Chris@0 | 50 ) |
Chris@0 | 51 ) |
Chris@0 | 52 returnType: null |
Chris@0 | 53 stmts: array( |
Chris@0 | 54 ) |
Chris@0 | 55 ) |
Chris@0 | 56 2: Stmt_Function( |
Chris@0 | 57 byRef: false |
Chris@0 | 58 name: test |
Chris@0 | 59 params: array( |
Chris@0 | 60 0: Param( |
Chris@0 | 61 type: null |
Chris@0 | 62 byRef: false |
Chris@0 | 63 variadic: false |
Chris@0 | 64 name: a |
Chris@0 | 65 default: null |
Chris@0 | 66 ) |
Chris@0 | 67 1: Param( |
Chris@0 | 68 type: Name( |
Chris@0 | 69 parts: array( |
Chris@0 | 70 0: Type |
Chris@0 | 71 ) |
Chris@0 | 72 ) |
Chris@0 | 73 byRef: false |
Chris@0 | 74 variadic: true |
Chris@0 | 75 name: b |
Chris@0 | 76 default: null |
Chris@0 | 77 ) |
Chris@0 | 78 ) |
Chris@0 | 79 returnType: null |
Chris@0 | 80 stmts: array( |
Chris@0 | 81 ) |
Chris@0 | 82 ) |
Chris@0 | 83 3: Stmt_Function( |
Chris@0 | 84 byRef: false |
Chris@0 | 85 name: test |
Chris@0 | 86 params: array( |
Chris@0 | 87 0: Param( |
Chris@0 | 88 type: null |
Chris@0 | 89 byRef: false |
Chris@0 | 90 variadic: false |
Chris@0 | 91 name: a |
Chris@0 | 92 default: null |
Chris@0 | 93 ) |
Chris@0 | 94 1: Param( |
Chris@0 | 95 type: Name( |
Chris@0 | 96 parts: array( |
Chris@0 | 97 0: Type |
Chris@0 | 98 ) |
Chris@0 | 99 ) |
Chris@0 | 100 byRef: true |
Chris@0 | 101 variadic: true |
Chris@0 | 102 name: b |
Chris@0 | 103 default: null |
Chris@0 | 104 ) |
Chris@0 | 105 ) |
Chris@0 | 106 returnType: null |
Chris@0 | 107 stmts: array( |
Chris@0 | 108 ) |
Chris@0 | 109 ) |
Chris@0 | 110 ) |