comparison vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.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 Conditional function definition
2 -----
3 <?php
4
5 if (true) {
6 function A() {}
7 }
8 -----
9 array(
10 0: Stmt_If(
11 cond: Expr_ConstFetch(
12 name: Name(
13 parts: array(
14 0: true
15 )
16 )
17 )
18 stmts: array(
19 0: Stmt_Function(
20 byRef: false
21 name: A
22 params: array(
23 )
24 returnType: null
25 stmts: array(
26 )
27 )
28 )
29 elseifs: array(
30 )
31 else: null
32 )
33 )