Skip to content

Latest commit

 

History

History
1114 lines (800 loc) · 11.2 KB

NodesOverview.md

File metadata and controls

1114 lines (800 loc) · 11.2 KB

Node Overview

Expressions

PhpParser\Node\Expr\ArrayDimFetch

$someVariable[0]

PhpParser\Node\Expr\ArrayItem

'name' => $Tom

PhpParser\Node\Expr\Array_

[]

PhpParser\Node\Expr\ArrowFunction

fn() => 1

PhpParser\Node\Expr\Assign

$someVariable = 'some value'

PhpParser\Node\Expr\AssignRef

$someVariable =& $someOtherVariable

PhpParser\Node\Expr\BitwiseNot

~$someVariable

PhpParser\Node\Expr\BooleanNot

!true

PhpParser\Node\Expr\ClassConstFetch

SomeClass::SOME_CONSTANT

PhpParser\Node\Expr\Clone_

clone $someVariable

PhpParser\Node\Expr\Closure

function () {
}

PhpParser\Node\Expr\ClosureUse

$someVariable

PhpParser\Node\Expr\ConstFetch

true

PhpParser\Node\Expr\Empty_

empty($someVariable)

PhpParser\Node\Expr\ErrorSuppress

@$someVariable

PhpParser\Node\Expr\Eval_

eval('Some php code')

PhpParser\Node\Expr\Exit_

die

PhpParser\Node\Expr\FuncCall

functionCall()

PhpParser\Node\Expr\Include_

include $someVariable

PhpParser\Node\Expr\Instanceof_

$someVariable instanceof SomeClass

PhpParser\Node\Expr\Isset_

isset($variable)

PhpParser\Node\Expr\List_

list($someVariable)

PhpParser\Node\Expr\MethodCall

$someObject->methodName()

PhpParser\Node\Expr\New_

new class
{
}

PhpParser\Node\Expr\PostDec

$someVariable--

PhpParser\Node\Expr\PostInc

$someVariable++

PhpParser\Node\Expr\PreDec

--$someVariable

PhpParser\Node\Expr\PreInc

++$someVariable

PhpParser\Node\Expr\Print_

print $someVariable

PhpParser\Node\Expr\PropertyFetch

$someVariable->propertyName

PhpParser\Node\Expr\ShellExec

`encapsedstring`

PhpParser\Node\Expr\StaticCall

SomeClass::methodName()

PhpParser\Node\Expr\StaticPropertyFetch

SomeClass::$someProperty

PhpParser\Node\Expr\Ternary

$someVariable ? true : false

PhpParser\Node\Expr\UnaryMinus

-$someVariable

PhpParser\Node\Expr\UnaryPlus

+$someVariable

PhpParser\Node\Expr\Variable

$someVariable

PhpParser\Node\Expr\YieldFrom

yield from $someVariable

PhpParser\Node\Expr\Yield_

yield

Children of "PhpParser\Node\Expr\AssignOp"

PhpParser\Node\Expr\AssignOp\BitwiseAnd

$variable &= 'value'

PhpParser\Node\Expr\AssignOp\BitwiseOr

$variable |= 'value'

PhpParser\Node\Expr\AssignOp\BitwiseXor

$variable ^= 'value'

PhpParser\Node\Expr\AssignOp\Coalesce

$variable ??= 'value'

PhpParser\Node\Expr\AssignOp\Concat

$variable .= 'value'

PhpParser\Node\Expr\AssignOp\Div

$variable /= 'value'

PhpParser\Node\Expr\AssignOp\Minus

$variable -= 'value'

PhpParser\Node\Expr\AssignOp\Mod

$variable %= 'value'

PhpParser\Node\Expr\AssignOp\Mul

$variable *= 'value'

PhpParser\Node\Expr\AssignOp\Plus

$variable += 'value'

PhpParser\Node\Expr\AssignOp\Pow

$variable **= 'value'

PhpParser\Node\Expr\AssignOp\ShiftLeft

$variable <<= 'value'

PhpParser\Node\Expr\AssignOp\ShiftRight

$variable >>= 'value'

Children of "PhpParser\Node\Expr\BinaryOp"

PhpParser\Node\Expr\BinaryOp\BitwiseAnd

1 & 'a'

PhpParser\Node\Expr\BinaryOp\BitwiseOr

1 | 'a'

PhpParser\Node\Expr\BinaryOp\BitwiseXor

1 ^ 'a'

PhpParser\Node\Expr\BinaryOp\BooleanAnd

1 && 'a'

PhpParser\Node\Expr\BinaryOp\BooleanOr

1 || 'a'

PhpParser\Node\Expr\BinaryOp\Coalesce

1 ?? 'a'

PhpParser\Node\Expr\BinaryOp\Concat

1 . 'a'

PhpParser\Node\Expr\BinaryOp\Div

1 / 'a'

PhpParser\Node\Expr\BinaryOp\Equal

1 == 'a'

PhpParser\Node\Expr\BinaryOp\Greater

1 > 'a'

PhpParser\Node\Expr\BinaryOp\GreaterOrEqual

1 >= 'a'

PhpParser\Node\Expr\BinaryOp\Identical

1 === 'a'

PhpParser\Node\Expr\BinaryOp\LogicalAnd

1 and 'a'

PhpParser\Node\Expr\BinaryOp\LogicalOr

1 or 'a'

PhpParser\Node\Expr\BinaryOp\LogicalXor

1 xor 'a'

PhpParser\Node\Expr\BinaryOp\Minus

1 - 'a'

PhpParser\Node\Expr\BinaryOp\Mod

1 % 'a'

PhpParser\Node\Expr\BinaryOp\Mul

1 * 'a'

PhpParser\Node\Expr\BinaryOp\NotEqual

1 != 'a'

PhpParser\Node\Expr\BinaryOp\NotIdentical

1 !== 'a'

PhpParser\Node\Expr\BinaryOp\Plus

1 + 'a'

PhpParser\Node\Expr\BinaryOp\Pow

1 ** 'a'

PhpParser\Node\Expr\BinaryOp\ShiftLeft

1 << 'a'

PhpParser\Node\Expr\BinaryOp\ShiftRight

1 >> 'a'

PhpParser\Node\Expr\BinaryOp\Smaller

1 < 'a'

PhpParser\Node\Expr\BinaryOp\SmallerOrEqual

1 <= 'a'

PhpParser\Node\Expr\BinaryOp\Spaceship

1 <=> 'a'

Children of "PhpParser\Node\Expr\Cast"

PhpParser\Node\Expr\Cast\Array_

(array) $value

PhpParser\Node\Expr\Cast\Bool_

(bool) $value

PhpParser\Node\Expr\Cast\Double

(double) $value

PhpParser\Node\Expr\Cast\Int_

(int) $value

PhpParser\Node\Expr\Cast\Object_

(object) $value

PhpParser\Node\Expr\Cast\String_

(string) $value

PhpParser\Node\Expr\Cast\Unset_

(unset) $value

Children of "PhpParser\Node\Name"

PhpParser\Node\Name

name

PhpParser\Node\Name\FullyQualified

\name

PhpParser\Node\Name\Relative

namespace\name

Scalar nodes

PhpParser\Node\Scalar\DNumber

10.5

PhpParser\Node\Scalar\Encapsed

"{$enscapsed}"

PhpParser\Node\Scalar\EncapsedStringPart

UNABLE_TO_PRINT_ENCAPSED_STRING

PhpParser\Node\Scalar\LNumber

100

PhpParser\Node\Scalar\MagicConst\Class_

__CLASS__

PhpParser\Node\Scalar\MagicConst\Dir

__DIR__

PhpParser\Node\Scalar\MagicConst\File

__FILE__

PhpParser\Node\Scalar\MagicConst\Function_

__FUNCTION__

PhpParser\Node\Scalar\MagicConst\Line

__LINE__

PhpParser\Node\Scalar\MagicConst\Method

__METHOD__

PhpParser\Node\Scalar\MagicConst\Namespace_

__NAMESPACE__

PhpParser\Node\Scalar\MagicConst\Trait_

__TRAIT__

PhpParser\Node\Scalar\String_

'string'

Statements

PhpParser\Node\Stmt\Break_

break;

PhpParser\Node\Stmt\Case_

case true:

PhpParser\Node\Stmt\Catch_

catch (CatchedType $catchedVariable) {
}

PhpParser\Node\Stmt\ClassConst

const SOME_CLASS_CONSTANT = 'default value';

PhpParser\Node\Stmt\ClassMethod

function someMethod()
{
}

PhpParser\Node\Stmt\Class_

class ClassName
{
}

PhpParser\Node\Stmt\Const_

const CONSTANT_IN_CLASS = 'default value';

PhpParser\Node\Stmt\Continue_

continue;

PhpParser\Node\Stmt\DeclareDeclare

strict_types=1

PhpParser\Node\Stmt\Declare_

declare(strict_types=1);

PhpParser\Node\Stmt\Do_

do {
} while ($variable);

PhpParser\Node\Stmt\Echo_

echo 'hello';

PhpParser\Node\Stmt\ElseIf_

elseif (true) {
}

PhpParser\Node\Stmt\Else_

else {
}

PhpParser\Node\Stmt\Expression

$someVariable;

PhpParser\Node\Stmt\Finally_

finally {
}

PhpParser\Node\Stmt\For_

for (;;) {
}

PhpParser\Node\Stmt\Foreach_

foreach ($variables as $value) {
}

PhpParser\Node\Stmt\Function_

function some_function()
{
}

PhpParser\Node\Stmt\Global_

global $globalVariable;

PhpParser\Node\Stmt\Goto_

goto goto_break;

PhpParser\Node\Stmt\GroupUse

use prefix\{UsedNamespace};

PhpParser\Node\Stmt\HaltCompiler

__halt_compiler();remaining

PhpParser\Node\Stmt\If_

if (true) {
}

PhpParser\Node\Stmt\InlineHTML

?>
<strong>feel</strong><?php

PhpParser\Node\Stmt\Interface_

interface SomeInterface
{
}

PhpParser\Node\Stmt\Label

label:

PhpParser\Node\Stmt\Namespace_

namespace {
}

PhpParser\Node\Stmt\Nop


PhpParser\Node\Stmt\Property

var $property;

PhpParser\Node\Stmt\PropertyProperty

$someProperty

PhpParser\Node\Stmt\Return_

return;

PhpParser\Node\Stmt\StaticVar

$variable

PhpParser\Node\Stmt\Static_

static $static;

PhpParser\Node\Stmt\Switch_

switch ($variable) {
    case 1:
}

PhpParser\Node\Stmt\Throw_

throw new $someException();

PhpParser\Node\Stmt\TraitUse

use trait;

PhpParser\Node\Stmt\TraitUseAdaptation\Alias

SomeTrait::method as public aliasedMethod;

PhpParser\Node\Stmt\TraitUseAdaptation\Precedence

SomeTrait::someMethod insteadof overriddenTrait;

PhpParser\Node\Stmt\Trait_

trait TraitName
{
}

PhpParser\Node\Stmt\TryCatch

try {
    function someFunction()
    {
    }
} function logException()
{
}

PhpParser\Node\Stmt\Unset_

unset($variable);

PhpParser\Node\Stmt\UseUse

UsedNamespace

PhpParser\Node\Stmt\Use_

use UsedNamespace;

PhpParser\Node\Stmt\While_

while ($variable) {
}

Various

PhpParser\Node\Arg

$someVariable

PhpParser\Node\Const_

CONSTANT_NAME = 'default'

PhpParser\Node\Identifier

identifier

PhpParser\Node\NullableType

?SomeType

PhpParser\Node\Param

$someVariable