php-parser/test/code/parser/expr/fetchAndCall/constFetch.test

43 lines
761 B
Plaintext
Raw Normal View History

2011-12-07 18:17:05 +01:00
Constant fetches
-----
<?php
A;
A::B;
A::class;
2011-12-07 18:17:05 +01:00
-----
array(
2017-01-19 22:25:22 +01:00
0: Stmt_Expression(
expr: Expr_ConstFetch(
name: Name(
parts: array(
0: A
)
2011-12-07 18:17:05 +01:00
)
)
)
2017-01-19 22:25:22 +01:00
1: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Name(
parts: array(
0: A
)
2011-12-07 18:17:05 +01:00
)
name: Identifier(
name: B
)
2011-12-07 18:17:05 +01:00
)
)
2017-01-19 22:25:22 +01:00
2: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Name(
parts: array(
0: A
)
)
name: Identifier(
name: class
)
)
)
2011-12-07 18:17:05 +01:00
)