Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test @ 1:1a348b17ec81
Logo and header background
author | Chris Cannam |
---|---|
date | Thu, 30 Nov 2017 14:56:35 +0000 |
parents | 4c8ae668cc8c |
children | 5fb285c0d0e3 |
rev | line source |
---|---|
Chris@0 | 1 UVS new expressions |
Chris@0 | 2 ----- |
Chris@0 | 3 <?php |
Chris@0 | 4 new $className; |
Chris@0 | 5 new $array['className']; |
Chris@0 | 6 new $array{'className'}; |
Chris@0 | 7 new $obj->className; |
Chris@0 | 8 new Test::$className; |
Chris@0 | 9 new $test::$className; |
Chris@0 | 10 new $weird[0]->foo::$className; |
Chris@0 | 11 ----- |
Chris@0 | 12 !!php7 |
Chris@0 | 13 array( |
Chris@0 | 14 0: Expr_New( |
Chris@0 | 15 class: Expr_Variable( |
Chris@0 | 16 name: className |
Chris@0 | 17 ) |
Chris@0 | 18 args: array( |
Chris@0 | 19 ) |
Chris@0 | 20 ) |
Chris@0 | 21 1: Expr_New( |
Chris@0 | 22 class: Expr_ArrayDimFetch( |
Chris@0 | 23 var: Expr_Variable( |
Chris@0 | 24 name: array |
Chris@0 | 25 ) |
Chris@0 | 26 dim: Scalar_String( |
Chris@0 | 27 value: className |
Chris@0 | 28 ) |
Chris@0 | 29 ) |
Chris@0 | 30 args: array( |
Chris@0 | 31 ) |
Chris@0 | 32 ) |
Chris@0 | 33 2: Expr_New( |
Chris@0 | 34 class: Expr_ArrayDimFetch( |
Chris@0 | 35 var: Expr_Variable( |
Chris@0 | 36 name: array |
Chris@0 | 37 ) |
Chris@0 | 38 dim: Scalar_String( |
Chris@0 | 39 value: className |
Chris@0 | 40 ) |
Chris@0 | 41 ) |
Chris@0 | 42 args: array( |
Chris@0 | 43 ) |
Chris@0 | 44 ) |
Chris@0 | 45 3: Expr_New( |
Chris@0 | 46 class: Expr_PropertyFetch( |
Chris@0 | 47 var: Expr_Variable( |
Chris@0 | 48 name: obj |
Chris@0 | 49 ) |
Chris@0 | 50 name: className |
Chris@0 | 51 ) |
Chris@0 | 52 args: array( |
Chris@0 | 53 ) |
Chris@0 | 54 ) |
Chris@0 | 55 4: Expr_New( |
Chris@0 | 56 class: Expr_StaticPropertyFetch( |
Chris@0 | 57 class: Name( |
Chris@0 | 58 parts: array( |
Chris@0 | 59 0: Test |
Chris@0 | 60 ) |
Chris@0 | 61 ) |
Chris@0 | 62 name: className |
Chris@0 | 63 ) |
Chris@0 | 64 args: array( |
Chris@0 | 65 ) |
Chris@0 | 66 ) |
Chris@0 | 67 5: Expr_New( |
Chris@0 | 68 class: Expr_StaticPropertyFetch( |
Chris@0 | 69 class: Expr_Variable( |
Chris@0 | 70 name: test |
Chris@0 | 71 ) |
Chris@0 | 72 name: className |
Chris@0 | 73 ) |
Chris@0 | 74 args: array( |
Chris@0 | 75 ) |
Chris@0 | 76 ) |
Chris@0 | 77 6: Expr_New( |
Chris@0 | 78 class: Expr_StaticPropertyFetch( |
Chris@0 | 79 class: Expr_PropertyFetch( |
Chris@0 | 80 var: Expr_ArrayDimFetch( |
Chris@0 | 81 var: Expr_Variable( |
Chris@0 | 82 name: weird |
Chris@0 | 83 ) |
Chris@0 | 84 dim: Scalar_LNumber( |
Chris@0 | 85 value: 0 |
Chris@0 | 86 ) |
Chris@0 | 87 ) |
Chris@0 | 88 name: foo |
Chris@0 | 89 ) |
Chris@0 | 90 name: className |
Chris@0 | 91 ) |
Chris@0 | 92 args: array( |
Chris@0 | 93 ) |
Chris@0 | 94 ) |
Chris@0 | 95 ) |