Class StatementNode
Base class for any statement.
A statement is a single executable unit of PHP code. You can think of a statement as a single "sentence" of code, usually ending with a semicolon. A single statement usually (but not always!) occupies a single line.
Here's an example of a perfectly valid statement:
<code>echo "Let's not go to Camelot. 'Tis a silly place.\n";</code>
Statements can contain other statements, or a block of statements surrounded by curly braces. A single statement is usually made up of one or more expressions.
Declarations are also statements. For instance, if/elseif/else and switch/case structures are statements, including all of their blocks. So is are class and function declarations. The body of the class or function is a statement block, but it's contained by the class or function declaration, which is a statement.
- Pharborist\Node implements Pharborist\NodeInterface
-
Pharborist\ParentNode implements Pharborist\ParentNodeInterface
-
Pharborist\StatementNode
Direct known subclasses
Pharborist\BlankStatementNode, Pharborist\ControlStructures\BreakStatementNode, Pharborist\ControlStructures\IfNode, Pharborist\ControlStructures\ReturnStatementNode, Pharborist\ControlStructures\SwitchNode, Pharborist\ControlStructures\WhileNode, Pharborist\EchoStatementNode, Pharborist\EchoTagStatementNode, Pharborist\Exceptions\ThrowStatementNode, Pharborist\Exceptions\TryCatchNode, Pharborist\ExpressionStatementNode, Pharborist\Functions\FunctionDeclarationNode, Pharborist\ControlStructures\CaseNode, Pharborist\Generators\YieldStatementNode, Pharborist\Namespaces\NamespaceNode, Pharborist\Namespaces\UseDeclarationStatementNode, Pharborist\Objects\ClassStatementNode, Pharborist\Objects\InterfaceMethodNode, Pharborist\Objects\InterfaceNode, Pharborist\Objects\SingleInheritanceNode, Pharborist\Objects\TraitAdaptationStatementNode, Pharborist\UnsetStatementNode, Pharborist\Variables\GlobalStatementNode, Pharborist\ControlStructures\ContinueStatementNode, Pharborist\Variables\StaticVariableStatementNode, Pharborist\ControlStructures\DeclareNode, Pharborist\ControlStructures\DefaultNode, Pharborist\ControlStructures\DoWhileNode, Pharborist\ControlStructures\ForeachNode, Pharborist\ControlStructures\ForNode, Pharborist\ControlStructures\GotoStatementNodeIndirect known subclasses
Pharborist\Constants\ConstantDeclarationStatementNode, Pharborist\Objects\ClassMemberListNode, Pharborist\Objects\ClassMethodNode, Pharborist\Objects\ClassNode, Pharborist\Objects\TraitAliasNode, Pharborist\Objects\TraitNode, Pharborist\Objects\TraitPrecedenceNode, Pharborist\Objects\TraitUseNode
public
integer
|
|
public
|
|
public
|
#
addCommentAbove(
Adds a line comment block above the statement. |
__clone(),
__toString(),
acceptVisitor(),
addChild(),
addChildren(),
append(),
childCount(),
children(),
clear(),
find(),
firstChild(),
firstToken(),
getSourcePosition(),
getText(),
getTree(),
has(),
isDescendant(),
isEmpty(),
lastChild(),
lastToken(),
mergeNode(),
prepend(),
walk()
|