diff options
Diffstat (limited to 'vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test')
-rw-r--r-- | vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test new file mode 100644 index 0000000..d9c886e --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test @@ -0,0 +1,33 @@ +Conditional function definition +----- +<?php + +if (true) { + function A() {} +} +----- +array( + 0: Stmt_If( + cond: Expr_ConstFetch( + name: Name( + parts: array( + 0: true + ) + ) + ) + stmts: array( + 0: Stmt_Function( + byRef: false + name: A + params: array( + ) + returnType: null + stmts: array( + ) + ) + ) + elseifs: array( + ) + else: null + ) +) |