comparison vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 5fb285c0d0e3
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 Special function variables
2 -----
3 <?php
4
5 function a() {
6 global $a, ${'b'}, $$c;
7 static $c, $d = 'e';
8 }
9 -----
10 array(
11 0: Stmt_Function(
12 byRef: false
13 name: a
14 params: array(
15 )
16 returnType: null
17 stmts: array(
18 0: Stmt_Global(
19 vars: array(
20 0: Expr_Variable(
21 name: a
22 )
23 1: Expr_Variable(
24 name: Scalar_String(
25 value: b
26 )
27 )
28 2: Expr_Variable(
29 name: Expr_Variable(
30 name: c
31 )
32 )
33 )
34 )
35 1: Stmt_Static(
36 vars: array(
37 0: Stmt_StaticVar(
38 name: c
39 default: null
40 )
41 1: Stmt_StaticVar(
42 name: d
43 default: Scalar_String(
44 value: e
45 )
46 )
47 )
48 )
49 )
50 )
51 )