mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-11 08:59:46 +01:00
18129480ae
Type makes it sound like a type-hint, and on a number of other nodes $type is used for exactly that. Use $flags to hold modifiers instead.
33 lines
568 B
Plaintext
33 lines
568 B
Plaintext
Conditional class definition
|
|
-----
|
|
<?php
|
|
|
|
if (true) {
|
|
class A {}
|
|
}
|
|
-----
|
|
array(
|
|
0: Stmt_If(
|
|
cond: Expr_ConstFetch(
|
|
name: Name(
|
|
parts: array(
|
|
0: true
|
|
)
|
|
)
|
|
)
|
|
stmts: array(
|
|
0: Stmt_Class(
|
|
flags: 0
|
|
name: A
|
|
extends: null
|
|
implements: array(
|
|
)
|
|
stmts: array(
|
|
)
|
|
)
|
|
)
|
|
elseifs: array(
|
|
)
|
|
else: null
|
|
)
|
|
) |