1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-11 17:09:41 +01:00
PHP-Parser/test/code/parser/stmt/const.test

48 lines
1.0 KiB
Plaintext
Raw Normal View History

2011-11-27 11:20:35 +01:00
Global constants
-----
<?php
const A = 0, B = 1.0, C = 'A', D = E;
-----
array(
0: Stmt_Const(
consts: array(
0: Const(
name: Identifier(
name: A
)
2011-11-27 11:20:35 +01:00
value: Scalar_LNumber(
value: 0
)
)
1: Const(
name: Identifier(
name: B
)
2011-11-27 11:20:35 +01:00
value: Scalar_DNumber(
value: 1
)
)
2: Const(
name: Identifier(
name: C
)
2011-11-27 11:20:35 +01:00
value: Scalar_String(
value: A
)
)
3: Const(
name: Identifier(
name: D
)
2011-11-27 11:20:35 +01:00
value: Expr_ConstFetch(
name: Name(
parts: array(
0: E
)
)
)
)
)
)
)