repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1 value | license stringclasses 7 values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2 classes |
|---|---|---|---|---|---|---|---|---|
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/Block.php | lib/PhpParser/Node/Stmt/Block.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node\Stmt;
class Block extends Stmt {
/** @var Stmt[] Statements */
public array $stmts;
/**
* A block of statements.
*
* @param Stmt[] $stmts Statements
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $stmts, array $attributes = []) {
$this->attributes = $attributes;
$this->stmts = $stmts;
}
public function getType(): string {
return 'Stmt_Block';
}
public function getSubNodeNames(): array {
return ['stmts'];
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/Function_.php | lib/PhpParser/Node/Stmt/Function_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
use PhpParser\Node\FunctionLike;
class Function_ extends Node\Stmt implements FunctionLike {
/** @var bool Whether function returns by reference */
public bool $byRef;
/** @var Node\Identifier Name */
public Node\Identifier $name;
/** @var Node\Param[] Parameters */
public array $params;
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
public ?Node $returnType;
/** @var Node\Stmt[] Statements */
public array $stmts;
/** @var Node\AttributeGroup[] PHP attribute groups */
public array $attrGroups;
/** @var Node\Name|null Namespaced name (if using NameResolver) */
public ?Node\Name $namespacedName;
/**
* Constructs a function node.
*
* @param string|Node\Identifier $name Name
* @param array{
* byRef?: bool,
* params?: Node\Param[],
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
* stmts?: Node\Stmt[],
* attrGroups?: Node\AttributeGroup[],
* } $subNodes Array of the following optional subnodes:
* 'byRef' => false : Whether to return by reference
* 'params' => array(): Parameters
* 'returnType' => null : Return type
* 'stmts' => array(): Statements
* 'attrGroups' => array(): PHP attribute groups
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct($name, array $subNodes = [], array $attributes = []) {
$this->attributes = $attributes;
$this->byRef = $subNodes['byRef'] ?? false;
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
$this->params = $subNodes['params'] ?? [];
$this->returnType = $subNodes['returnType'] ?? null;
$this->stmts = $subNodes['stmts'] ?? [];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}
public function getSubNodeNames(): array {
return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts'];
}
public function returnsByRef(): bool {
return $this->byRef;
}
public function getParams(): array {
return $this->params;
}
public function getReturnType() {
return $this->returnType;
}
public function getAttrGroups(): array {
return $this->attrGroups;
}
/** @return Node\Stmt[] */
public function getStmts(): array {
return $this->stmts;
}
public function getType(): string {
return 'Stmt_Function';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/ClassMethod.php | lib/PhpParser/Node/Stmt/ClassMethod.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Modifiers;
use PhpParser\Node;
use PhpParser\Node\FunctionLike;
class ClassMethod extends Node\Stmt implements FunctionLike {
/** @var int Flags */
public int $flags;
/** @var bool Whether to return by reference */
public bool $byRef;
/** @var Node\Identifier Name */
public Node\Identifier $name;
/** @var Node\Param[] Parameters */
public array $params;
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
public ?Node $returnType;
/** @var Node\Stmt[]|null Statements */
public ?array $stmts;
/** @var Node\AttributeGroup[] PHP attribute groups */
public array $attrGroups;
/** @var array<string, bool> */
private static array $magicNames = [
'__construct' => true,
'__destruct' => true,
'__call' => true,
'__callstatic' => true,
'__get' => true,
'__set' => true,
'__isset' => true,
'__unset' => true,
'__sleep' => true,
'__wakeup' => true,
'__tostring' => true,
'__set_state' => true,
'__clone' => true,
'__invoke' => true,
'__debuginfo' => true,
'__serialize' => true,
'__unserialize' => true,
];
/**
* Constructs a class method node.
*
* @param string|Node\Identifier $name Name
* @param array{
* flags?: int,
* byRef?: bool,
* params?: Node\Param[],
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
* stmts?: Node\Stmt[]|null,
* attrGroups?: Node\AttributeGroup[],
* } $subNodes Array of the following optional subnodes:
* 'flags => 0 : Flags
* 'byRef' => false : Whether to return by reference
* 'params' => array() : Parameters
* 'returnType' => null : Return type
* 'stmts' => array() : Statements
* 'attrGroups' => array() : PHP attribute groups
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct($name, array $subNodes = [], array $attributes = []) {
$this->attributes = $attributes;
$this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
$this->byRef = $subNodes['byRef'] ?? false;
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
$this->params = $subNodes['params'] ?? [];
$this->returnType = $subNodes['returnType'] ?? null;
$this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : [];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}
public function getSubNodeNames(): array {
return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
}
public function returnsByRef(): bool {
return $this->byRef;
}
public function getParams(): array {
return $this->params;
}
public function getReturnType() {
return $this->returnType;
}
public function getStmts(): ?array {
return $this->stmts;
}
public function getAttrGroups(): array {
return $this->attrGroups;
}
/**
* Whether the method is explicitly or implicitly public.
*/
public function isPublic(): bool {
return ($this->flags & Modifiers::PUBLIC) !== 0
|| ($this->flags & Modifiers::VISIBILITY_MASK) === 0;
}
/**
* Whether the method is protected.
*/
public function isProtected(): bool {
return (bool) ($this->flags & Modifiers::PROTECTED);
}
/**
* Whether the method is private.
*/
public function isPrivate(): bool {
return (bool) ($this->flags & Modifiers::PRIVATE);
}
/**
* Whether the method is abstract.
*/
public function isAbstract(): bool {
return (bool) ($this->flags & Modifiers::ABSTRACT);
}
/**
* Whether the method is final.
*/
public function isFinal(): bool {
return (bool) ($this->flags & Modifiers::FINAL);
}
/**
* Whether the method is static.
*/
public function isStatic(): bool {
return (bool) ($this->flags & Modifiers::STATIC);
}
/**
* Whether the method is magic.
*/
public function isMagic(): bool {
return isset(self::$magicNames[$this->name->toLowerString()]);
}
public function getType(): string {
return 'Stmt_ClassMethod';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/TryCatch.php | lib/PhpParser/Node/Stmt/TryCatch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
class TryCatch extends Node\Stmt {
/** @var Node\Stmt[] Statements */
public array $stmts;
/** @var Catch_[] Catches */
public array $catches;
/** @var null|Finally_ Optional finally node */
public ?Finally_ $finally;
/**
* Constructs a try catch node.
*
* @param Node\Stmt[] $stmts Statements
* @param Catch_[] $catches Catches
* @param null|Finally_ $finally Optional finally node
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) {
$this->attributes = $attributes;
$this->stmts = $stmts;
$this->catches = $catches;
$this->finally = $finally;
}
public function getSubNodeNames(): array {
return ['stmts', 'catches', 'finally'];
}
public function getType(): string {
return 'Stmt_TryCatch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/Do_.php | lib/PhpParser/Node/Stmt/Do_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
class Do_ extends Node\Stmt {
/** @var Node\Stmt[] Statements */
public array $stmts;
/** @var Node\Expr Condition */
public Node\Expr $cond;
/**
* Constructs a do while node.
*
* @param Node\Expr $cond Condition
* @param Node\Stmt[] $stmts Statements
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
$this->attributes = $attributes;
$this->cond = $cond;
$this->stmts = $stmts;
}
public function getSubNodeNames(): array {
return ['stmts', 'cond'];
}
public function getType(): string {
return 'Stmt_Do';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/Trait_.php | lib/PhpParser/Node/Stmt/Trait_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
class Trait_ extends ClassLike {
/**
* Constructs a trait node.
*
* @param string|Node\Identifier $name Name
* @param array{
* stmts?: Node\Stmt[],
* attrGroups?: Node\AttributeGroup[],
* } $subNodes Array of the following optional subnodes:
* 'stmts' => array(): Statements
* 'attrGroups' => array(): PHP attribute groups
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct($name, array $subNodes = [], array $attributes = []) {
$this->attributes = $attributes;
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
$this->stmts = $subNodes['stmts'] ?? [];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}
public function getSubNodeNames(): array {
return ['attrGroups', 'name', 'stmts'];
}
public function getType(): string {
return 'Stmt_Trait';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/ElseIf_.php | lib/PhpParser/Node/Stmt/ElseIf_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
class ElseIf_ extends Node\Stmt {
/** @var Node\Expr Condition */
public Node\Expr $cond;
/** @var Node\Stmt[] Statements */
public array $stmts;
/**
* Constructs an elseif node.
*
* @param Node\Expr $cond Condition
* @param Node\Stmt[] $stmts Statements
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
$this->attributes = $attributes;
$this->cond = $cond;
$this->stmts = $stmts;
}
public function getSubNodeNames(): array {
return ['cond', 'stmts'];
}
public function getType(): string {
return 'Stmt_ElseIf';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/Static_.php | lib/PhpParser/Node/Stmt/Static_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node\StaticVar;
use PhpParser\Node\Stmt;
class Static_ extends Stmt {
/** @var StaticVar[] Variable definitions */
public array $vars;
/**
* Constructs a static variables list node.
*
* @param StaticVar[] $vars Variable definitions
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $vars, array $attributes = []) {
$this->attributes = $attributes;
$this->vars = $vars;
}
public function getSubNodeNames(): array {
return ['vars'];
}
public function getType(): string {
return 'Stmt_Static';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/ClassConst.php | lib/PhpParser/Node/Stmt/ClassConst.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Modifiers;
use PhpParser\Node;
class ClassConst extends Node\Stmt {
/** @var int Modifiers */
public int $flags;
/** @var Node\Const_[] Constant declarations */
public array $consts;
/** @var Node\AttributeGroup[] PHP attribute groups */
public array $attrGroups;
/** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */
public ?Node $type;
/**
* Constructs a class const list node.
*
* @param Node\Const_[] $consts Constant declarations
* @param int $flags Modifiers
* @param array<string, mixed> $attributes Additional attributes
* @param list<Node\AttributeGroup> $attrGroups PHP attribute groups
* @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration
*/
public function __construct(
array $consts,
int $flags = 0,
array $attributes = [],
array $attrGroups = [],
?Node $type = null
) {
$this->attributes = $attributes;
$this->flags = $flags;
$this->consts = $consts;
$this->attrGroups = $attrGroups;
$this->type = $type;
}
public function getSubNodeNames(): array {
return ['attrGroups', 'flags', 'type', 'consts'];
}
/**
* Whether constant is explicitly or implicitly public.
*/
public function isPublic(): bool {
return ($this->flags & Modifiers::PUBLIC) !== 0
|| ($this->flags & Modifiers::VISIBILITY_MASK) === 0;
}
/**
* Whether constant is protected.
*/
public function isProtected(): bool {
return (bool) ($this->flags & Modifiers::PROTECTED);
}
/**
* Whether constant is private.
*/
public function isPrivate(): bool {
return (bool) ($this->flags & Modifiers::PRIVATE);
}
/**
* Whether constant is final.
*/
public function isFinal(): bool {
return (bool) ($this->flags & Modifiers::FINAL);
}
public function getType(): string {
return 'Stmt_ClassConst';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/HaltCompiler.php | lib/PhpParser/Node/Stmt/HaltCompiler.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node\Stmt;
class HaltCompiler extends Stmt {
/** @var string Remaining text after halt compiler statement. */
public string $remaining;
/**
* Constructs a __halt_compiler node.
*
* @param string $remaining Remaining text after halt compiler statement.
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(string $remaining, array $attributes = []) {
$this->attributes = $attributes;
$this->remaining = $remaining;
}
public function getSubNodeNames(): array {
return ['remaining'];
}
public function getType(): string {
return 'Stmt_HaltCompiler';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/Goto_.php | lib/PhpParser/Node/Stmt/Goto_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt;
class Goto_ extends Stmt {
/** @var Identifier Name of label to jump to */
public Identifier $name;
/**
* Constructs a goto node.
*
* @param string|Identifier $name Name of label to jump to
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct($name, array $attributes = []) {
$this->attributes = $attributes;
$this->name = \is_string($name) ? new Identifier($name) : $name;
}
public function getSubNodeNames(): array {
return ['name'];
}
public function getType(): string {
return 'Stmt_Goto';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php | lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt\TraitUseAdaptation;
use PhpParser\Node;
class Alias extends Node\Stmt\TraitUseAdaptation {
/** @var null|int New modifier */
public ?int $newModifier;
/** @var null|Node\Identifier New name */
public ?Node\Identifier $newName;
/**
* Constructs a trait use precedence adaptation node.
*
* @param null|Node\Name $trait Trait name
* @param string|Node\Identifier $method Method name
* @param null|int $newModifier New modifier
* @param null|string|Node\Identifier $newName New name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) {
$this->attributes = $attributes;
$this->trait = $trait;
$this->method = \is_string($method) ? new Node\Identifier($method) : $method;
$this->newModifier = $newModifier;
$this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName;
}
public function getSubNodeNames(): array {
return ['trait', 'method', 'newModifier', 'newName'];
}
public function getType(): string {
return 'Stmt_TraitUseAdaptation_Alias';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php | lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Stmt\TraitUseAdaptation;
use PhpParser\Node;
class Precedence extends Node\Stmt\TraitUseAdaptation {
/** @var Node\Name[] Overwritten traits */
public array $insteadof;
/**
* Constructs a trait use precedence adaptation node.
*
* @param Node\Name $trait Trait name
* @param string|Node\Identifier $method Method name
* @param Node\Name[] $insteadof Overwritten traits
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) {
$this->attributes = $attributes;
$this->trait = $trait;
$this->method = \is_string($method) ? new Node\Identifier($method) : $method;
$this->insteadof = $insteadof;
}
public function getSubNodeNames(): array {
return ['trait', 'method', 'insteadof'];
}
public function getType(): string {
return 'Stmt_TraitUseAdaptation_Precedence';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Name/FullyQualified.php | lib/PhpParser/Node/Name/FullyQualified.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Name;
class FullyQualified extends \PhpParser\Node\Name {
/**
* Checks whether the name is unqualified. (E.g. Name)
*
* @return bool Whether the name is unqualified
*/
public function isUnqualified(): bool {
return false;
}
/**
* Checks whether the name is qualified. (E.g. Name\Name)
*
* @return bool Whether the name is qualified
*/
public function isQualified(): bool {
return false;
}
/**
* Checks whether the name is fully qualified. (E.g. \Name)
*
* @return bool Whether the name is fully qualified
*/
public function isFullyQualified(): bool {
return true;
}
/**
* Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
*
* @return bool Whether the name is relative
*/
public function isRelative(): bool {
return false;
}
public function toCodeString(): string {
return '\\' . $this->toString();
}
public function getType(): string {
return 'Name_FullyQualified';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Name/Relative.php | lib/PhpParser/Node/Name/Relative.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Name;
class Relative extends \PhpParser\Node\Name {
/**
* Checks whether the name is unqualified. (E.g. Name)
*
* @return bool Whether the name is unqualified
*/
public function isUnqualified(): bool {
return false;
}
/**
* Checks whether the name is qualified. (E.g. Name\Name)
*
* @return bool Whether the name is qualified
*/
public function isQualified(): bool {
return false;
}
/**
* Checks whether the name is fully qualified. (E.g. \Name)
*
* @return bool Whether the name is fully qualified
*/
public function isFullyQualified(): bool {
return false;
}
/**
* Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
*
* @return bool Whether the name is relative
*/
public function isRelative(): bool {
return true;
}
public function toCodeString(): string {
return 'namespace\\' . $this->toString();
}
public function getType(): string {
return 'Name_Relative';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php | lib/PhpParser/Node/Expr/NullsafePropertyFetch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
class NullsafePropertyFetch extends Expr {
/** @var Expr Variable holding object */
public Expr $var;
/** @var Identifier|Expr Property name */
public Node $name;
/**
* Constructs a nullsafe property fetch node.
*
* @param Expr $var Variable holding object
* @param string|Identifier|Expr $name Property name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, $name, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->name = \is_string($name) ? new Identifier($name) : $name;
}
public function getSubNodeNames(): array {
return ['var', 'name'];
}
public function getType(): string {
return 'Expr_NullsafePropertyFetch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Array_.php | lib/PhpParser/Node/Expr/Array_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr;
class Array_ extends Expr {
// For use in "kind" attribute
public const KIND_LONG = 1; // array() syntax
public const KIND_SHORT = 2; // [] syntax
/** @var ArrayItem[] Items */
public array $items;
/**
* Constructs an array node.
*
* @param ArrayItem[] $items Items of the array
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $items = [], array $attributes = []) {
$this->attributes = $attributes;
$this->items = $items;
}
public function getSubNodeNames(): array {
return ['items'];
}
public function getType(): string {
return 'Expr_Array';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BooleanNot.php | lib/PhpParser/Node/Expr/BooleanNot.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class BooleanNot extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a boolean not node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_BooleanNot';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/PostDec.php | lib/PhpParser/Node/Expr/PostDec.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class PostDec extends Expr {
/** @var Expr Variable */
public Expr $var;
/**
* Constructs a post decrement node.
*
* @param Expr $var Variable
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
}
public function getSubNodeNames(): array {
return ['var'];
}
public function getType(): string {
return 'Expr_PostDec';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ArrayItem.php | lib/PhpParser/Node/Expr/ArrayItem.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
require __DIR__ . '/../ArrayItem.php';
if (false) {
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\ArrayItem instead.
*/
class ArrayItem extends \PhpParser\Node\ArrayItem {
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Empty_.php | lib/PhpParser/Node/Expr/Empty_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Empty_ extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs an empty() node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_Empty';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/PropertyFetch.php | lib/PhpParser/Node/Expr/PropertyFetch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
class PropertyFetch extends Expr {
/** @var Expr Variable holding object */
public Expr $var;
/** @var Identifier|Expr Property name */
public Node $name;
/**
* Constructs a function call node.
*
* @param Expr $var Variable holding object
* @param string|Identifier|Expr $name Property name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, $name, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->name = \is_string($name) ? new Identifier($name) : $name;
}
public function getSubNodeNames(): array {
return ['var', 'name'];
}
public function getType(): string {
return 'Expr_PropertyFetch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/YieldFrom.php | lib/PhpParser/Node/Expr/YieldFrom.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class YieldFrom extends Expr {
/** @var Expr Expression to yield from */
public Expr $expr;
/**
* Constructs an "yield from" node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_YieldFrom';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/StaticPropertyFetch.php | lib/PhpParser/Node/Expr/StaticPropertyFetch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\VarLikeIdentifier;
class StaticPropertyFetch extends Expr {
/** @var Name|Expr Class name */
public Node $class;
/** @var VarLikeIdentifier|Expr Property name */
public Node $name;
/**
* Constructs a static property fetch node.
*
* @param Name|Expr $class Class name
* @param string|VarLikeIdentifier|Expr $name Property name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node $class, $name, array $attributes = []) {
$this->attributes = $attributes;
$this->class = $class;
$this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name;
}
public function getSubNodeNames(): array {
return ['class', 'name'];
}
public function getType(): string {
return 'Expr_StaticPropertyFetch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignRef.php | lib/PhpParser/Node/Expr/AssignRef.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class AssignRef extends Expr {
/** @var Expr Variable reference is assigned to */
public Expr $var;
/** @var Expr Variable which is referenced */
public Expr $expr;
/**
* Constructs an assignment node.
*
* @param Expr $var Variable
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['var', 'expr'];
}
public function getType(): string {
return 'Expr_AssignRef';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Exit_.php | lib/PhpParser/Node/Expr/Exit_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Exit_ extends Expr {
/* For use in "kind" attribute */
public const KIND_EXIT = 1;
public const KIND_DIE = 2;
/** @var null|Expr Expression */
public ?Expr $expr;
/**
* Constructs an exit() node.
*
* @param null|Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(?Expr $expr = null, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_Exit';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Instanceof_.php | lib/PhpParser/Node/Expr/Instanceof_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
class Instanceof_ extends Expr {
/** @var Expr Expression */
public Expr $expr;
/** @var Name|Expr Class name */
public Node $class;
/**
* Constructs an instanceof check node.
*
* @param Expr $expr Expression
* @param Name|Expr $class Class name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, Node $class, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
$this->class = $class;
}
public function getSubNodeNames(): array {
return ['expr', 'class'];
}
public function getType(): string {
return 'Expr_Instanceof';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/UnaryPlus.php | lib/PhpParser/Node/Expr/UnaryPlus.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class UnaryPlus extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a unary plus node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_UnaryPlus';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Isset_.php | lib/PhpParser/Node/Expr/Isset_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Isset_ extends Expr {
/** @var Expr[] Variables */
public array $vars;
/**
* Constructs an array node.
*
* @param Expr[] $vars Variables
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $vars, array $attributes = []) {
$this->attributes = $attributes;
$this->vars = $vars;
}
public function getSubNodeNames(): array {
return ['vars'];
}
public function getType(): string {
return 'Expr_Isset';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Clone_.php | lib/PhpParser/Node/Expr/Clone_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Clone_ extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a clone node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_Clone';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Match_.php | lib/PhpParser/Node/Expr/Match_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\MatchArm;
class Match_ extends Node\Expr {
/** @var Node\Expr Condition */
public Node\Expr $cond;
/** @var MatchArm[] */
public array $arms;
/**
* @param Node\Expr $cond Condition
* @param MatchArm[] $arms
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) {
$this->attributes = $attributes;
$this->cond = $cond;
$this->arms = $arms;
}
public function getSubNodeNames(): array {
return ['cond', 'arms'];
}
public function getType(): string {
return 'Expr_Match';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ArrowFunction.php | lib/PhpParser/Node/Expr/ArrowFunction.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\FunctionLike;
class ArrowFunction extends Expr implements FunctionLike {
/** @var bool Whether the closure is static */
public bool $static;
/** @var bool Whether to return by reference */
public bool $byRef;
/** @var Node\Param[] */
public array $params = [];
/** @var null|Node\Identifier|Node\Name|Node\ComplexType */
public ?Node $returnType;
/** @var Expr Expression body */
public Expr $expr;
/** @var Node\AttributeGroup[] */
public array $attrGroups;
/**
* @param array{
* expr: Expr,
* static?: bool,
* byRef?: bool,
* params?: Node\Param[],
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
* attrGroups?: Node\AttributeGroup[]
* } $subNodes Array of the following subnodes:
* 'expr' : Expression body
* 'static' => false : Whether the closure is static
* 'byRef' => false : Whether to return by reference
* 'params' => array() : Parameters
* 'returnType' => null : Return type
* 'attrGroups' => array() : PHP attribute groups
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $subNodes, array $attributes = []) {
$this->attributes = $attributes;
$this->static = $subNodes['static'] ?? false;
$this->byRef = $subNodes['byRef'] ?? false;
$this->params = $subNodes['params'] ?? [];
$this->returnType = $subNodes['returnType'] ?? null;
$this->expr = $subNodes['expr'];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}
public function getSubNodeNames(): array {
return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr'];
}
public function returnsByRef(): bool {
return $this->byRef;
}
public function getParams(): array {
return $this->params;
}
public function getReturnType() {
return $this->returnType;
}
public function getAttrGroups(): array {
return $this->attrGroups;
}
/**
* @return Node\Stmt\Return_[]
*/
public function getStmts(): array {
return [new Node\Stmt\Return_($this->expr)];
}
public function getType(): string {
return 'Expr_ArrowFunction';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ErrorSuppress.php | lib/PhpParser/Node/Expr/ErrorSuppress.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class ErrorSuppress extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs an error suppress node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_ErrorSuppress';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/PostInc.php | lib/PhpParser/Node/Expr/PostInc.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class PostInc extends Expr {
/** @var Expr Variable */
public Expr $var;
/**
* Constructs a post increment node.
*
* @param Expr $var Variable
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
}
public function getSubNodeNames(): array {
return ['var'];
}
public function getType(): string {
return 'Expr_PostInc';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp.php | lib/PhpParser/Node/Expr/BinaryOp.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
abstract class BinaryOp extends Expr {
/** @var Expr The left hand side expression */
public Expr $left;
/** @var Expr The right hand side expression */
public Expr $right;
/**
* Constructs a binary operator node.
*
* @param Expr $left The left hand side expression
* @param Expr $right The right hand side expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $left, Expr $right, array $attributes = []) {
$this->attributes = $attributes;
$this->left = $left;
$this->right = $right;
}
public function getSubNodeNames(): array {
return ['left', 'right'];
}
/**
* Get the operator sigil for this binary operation.
*
* In the case there are multiple possible sigils for an operator, this method does not
* necessarily return the one used in the parsed code.
*/
abstract public function getOperatorSigil(): string;
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ShellExec.php | lib/PhpParser/Node/Expr/ShellExec.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
use PhpParser\Node\InterpolatedStringPart;
class ShellExec extends Expr {
/** @var (Expr|InterpolatedStringPart)[] Interpolated string array */
public array $parts;
/**
* Constructs a shell exec (backtick) node.
*
* @param (Expr|InterpolatedStringPart)[] $parts Interpolated string array
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $parts, array $attributes = []) {
$this->attributes = $attributes;
$this->parts = $parts;
}
public function getSubNodeNames(): array {
return ['parts'];
}
public function getType(): string {
return 'Expr_ShellExec';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/NullsafeMethodCall.php | lib/PhpParser/Node/Expr/NullsafeMethodCall.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
class NullsafeMethodCall extends CallLike {
/** @var Expr Variable holding object */
public Expr $var;
/** @var Identifier|Expr Method name */
public Node $name;
/** @var array<Arg|VariadicPlaceholder> Arguments */
public array $args;
/**
* Constructs a nullsafe method call node.
*
* @param Expr $var Variable holding object
* @param string|Identifier|Expr $name Method name
* @param array<Arg|VariadicPlaceholder> $args Arguments
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, $name, array $args = [], array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->name = \is_string($name) ? new Identifier($name) : $name;
$this->args = $args;
}
public function getSubNodeNames(): array {
return ['var', 'name', 'args'];
}
public function getType(): string {
return 'Expr_NullsafeMethodCall';
}
public function getRawArgs(): array {
return $this->args;
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/PreInc.php | lib/PhpParser/Node/Expr/PreInc.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class PreInc extends Expr {
/** @var Expr Variable */
public Expr $var;
/**
* Constructs a pre increment node.
*
* @param Expr $var Variable
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
}
public function getSubNodeNames(): array {
return ['var'];
}
public function getType(): string {
return 'Expr_PreInc';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/List_.php | lib/PhpParser/Node/Expr/List_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr;
class List_ extends Expr {
// For use in "kind" attribute
public const KIND_LIST = 1; // list() syntax
public const KIND_ARRAY = 2; // [] syntax
/** @var (ArrayItem|null)[] List of items to assign to */
public array $items;
/**
* Constructs a list() destructuring node.
*
* @param (ArrayItem|null)[] $items List of items to assign to
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $items, array $attributes = []) {
$this->attributes = $attributes;
$this->items = $items;
}
public function getSubNodeNames(): array {
return ['items'];
}
public function getType(): string {
return 'Expr_List';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/New_.php | lib/PhpParser/Node/Expr/New_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\VariadicPlaceholder;
class New_ extends CallLike {
/** @var Node\Name|Expr|Node\Stmt\Class_ Class name */
public Node $class;
/** @var array<Arg|VariadicPlaceholder> Arguments */
public array $args;
/**
* Constructs a function call node.
*
* @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes)
* @param array<Arg|VariadicPlaceholder> $args Arguments
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node $class, array $args = [], array $attributes = []) {
$this->attributes = $attributes;
$this->class = $class;
$this->args = $args;
}
public function getSubNodeNames(): array {
return ['class', 'args'];
}
public function getType(): string {
return 'Expr_New';
}
public function getRawArgs(): array {
return $this->args;
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Error.php | lib/PhpParser/Node/Expr/Error.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
/**
* Error node used during parsing with error recovery.
*
* An error node may be placed at a position where an expression is required, but an error occurred.
* Error nodes will not be present if the parser is run in throwOnError mode (the default).
*/
class Error extends Expr {
/**
* Constructs an error node.
*
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $attributes = []) {
$this->attributes = $attributes;
}
public function getSubNodeNames(): array {
return [];
}
public function getType(): string {
return 'Expr_Error';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Include_.php | lib/PhpParser/Node/Expr/Include_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Include_ extends Expr {
public const TYPE_INCLUDE = 1;
public const TYPE_INCLUDE_ONCE = 2;
public const TYPE_REQUIRE = 3;
public const TYPE_REQUIRE_ONCE = 4;
/** @var Expr Expression */
public Expr $expr;
/** @var int Type of include */
public int $type;
/**
* Constructs an include node.
*
* @param Expr $expr Expression
* @param int $type Type of include
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, int $type, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
$this->type = $type;
}
public function getSubNodeNames(): array {
return ['expr', 'type'];
}
public function getType(): string {
return 'Expr_Include';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast.php | lib/PhpParser/Node/Expr/Cast.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
abstract class Cast extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a cast node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ConstFetch.php | lib/PhpParser/Node/Expr/ConstFetch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
class ConstFetch extends Expr {
/** @var Name Constant name */
public Name $name;
/**
* Constructs a const fetch node.
*
* @param Name $name Constant name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Name $name, array $attributes = []) {
$this->attributes = $attributes;
$this->name = $name;
}
public function getSubNodeNames(): array {
return ['name'];
}
public function getType(): string {
return 'Expr_ConstFetch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Eval_.php | lib/PhpParser/Node/Expr/Eval_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Eval_ extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs an eval() node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_Eval';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Assign.php | lib/PhpParser/Node/Expr/Assign.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Assign extends Expr {
/** @var Expr Variable */
public Expr $var;
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs an assignment node.
*
* @param Expr $var Variable
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['var', 'expr'];
}
public function getType(): string {
return 'Expr_Assign';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Print_.php | lib/PhpParser/Node/Expr/Print_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Print_ extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs an print() node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_Print';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/UnaryMinus.php | lib/PhpParser/Node/Expr/UnaryMinus.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class UnaryMinus extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a unary minus node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_UnaryMinus';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Ternary.php | lib/PhpParser/Node/Expr/Ternary.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Ternary extends Expr {
/** @var Expr Condition */
public Expr $cond;
/** @var null|Expr Expression for true */
public ?Expr $if;
/** @var Expr Expression for false */
public Expr $else;
/**
* Constructs a ternary operator node.
*
* @param Expr $cond Condition
* @param null|Expr $if Expression for true
* @param Expr $else Expression for false
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) {
$this->attributes = $attributes;
$this->cond = $cond;
$this->if = $if;
$this->else = $else;
}
public function getSubNodeNames(): array {
return ['cond', 'if', 'else'];
}
public function getType(): string {
return 'Expr_Ternary';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/MethodCall.php | lib/PhpParser/Node/Expr/MethodCall.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
class MethodCall extends CallLike {
/** @var Expr Variable holding object */
public Expr $var;
/** @var Identifier|Expr Method name */
public Node $name;
/** @var array<Arg|VariadicPlaceholder> Arguments */
public array $args;
/**
* Constructs a function call node.
*
* @param Expr $var Variable holding object
* @param string|Identifier|Expr $name Method name
* @param array<Arg|VariadicPlaceholder> $args Arguments
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, $name, array $args = [], array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->name = \is_string($name) ? new Identifier($name) : $name;
$this->args = $args;
}
public function getSubNodeNames(): array {
return ['var', 'name', 'args'];
}
public function getType(): string {
return 'Expr_MethodCall';
}
public function getRawArgs(): array {
return $this->args;
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ClosureUse.php | lib/PhpParser/Node/Expr/ClosureUse.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
require __DIR__ . '/../ClosureUse.php';
if (false) {
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\ClosureUse instead.
*/
class ClosureUse extends \PhpParser\Node\ClosureUse {
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/PreDec.php | lib/PhpParser/Node/Expr/PreDec.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class PreDec extends Expr {
/** @var Expr Variable */
public Expr $var;
/**
* Constructs a pre decrement node.
*
* @param Expr $var Variable
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
}
public function getSubNodeNames(): array {
return ['var'];
}
public function getType(): string {
return 'Expr_PreDec';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/FuncCall.php | lib/PhpParser/Node/Expr/FuncCall.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
class FuncCall extends CallLike {
/** @var Node\Name|Expr Function name */
public Node $name;
/** @var array<Node\Arg|Node\VariadicPlaceholder> Arguments */
public array $args;
/**
* Constructs a function call node.
*
* @param Node\Name|Expr $name Function name
* @param array<Node\Arg|Node\VariadicPlaceholder> $args Arguments
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node $name, array $args = [], array $attributes = []) {
$this->attributes = $attributes;
$this->name = $name;
$this->args = $args;
}
public function getSubNodeNames(): array {
return ['name', 'args'];
}
public function getType(): string {
return 'Expr_FuncCall';
}
public function getRawArgs(): array {
return $this->args;
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ClassConstFetch.php | lib/PhpParser/Node/Expr/ClassConstFetch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
class ClassConstFetch extends Expr {
/** @var Name|Expr Class name */
public Node $class;
/** @var Identifier|Expr|Error Constant name */
public Node $name;
/**
* Constructs a class const fetch node.
*
* @param Name|Expr $class Class name
* @param string|Identifier|Expr|Error $name Constant name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node $class, $name, array $attributes = []) {
$this->attributes = $attributes;
$this->class = $class;
$this->name = \is_string($name) ? new Identifier($name) : $name;
}
public function getSubNodeNames(): array {
return ['class', 'name'];
}
public function getType(): string {
return 'Expr_ClassConstFetch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/StaticCall.php | lib/PhpParser/Node/Expr/StaticCall.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
class StaticCall extends CallLike {
/** @var Node\Name|Expr Class name */
public Node $class;
/** @var Identifier|Expr Method name */
public Node $name;
/** @var array<Arg|VariadicPlaceholder> Arguments */
public array $args;
/**
* Constructs a static method call node.
*
* @param Node\Name|Expr $class Class name
* @param string|Identifier|Expr $name Method name
* @param array<Arg|VariadicPlaceholder> $args Arguments
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node $class, $name, array $args = [], array $attributes = []) {
$this->attributes = $attributes;
$this->class = $class;
$this->name = \is_string($name) ? new Identifier($name) : $name;
$this->args = $args;
}
public function getSubNodeNames(): array {
return ['class', 'name', 'args'];
}
public function getType(): string {
return 'Expr_StaticCall';
}
public function getRawArgs(): array {
return $this->args;
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Yield_.php | lib/PhpParser/Node/Expr/Yield_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Yield_ extends Expr {
/** @var null|Expr Key expression */
public ?Expr $key;
/** @var null|Expr Value expression */
public ?Expr $value;
/**
* Constructs a yield expression node.
*
* @param null|Expr $value Value expression
* @param null|Expr $key Key expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) {
$this->attributes = $attributes;
$this->key = $key;
$this->value = $value;
}
public function getSubNodeNames(): array {
return ['key', 'value'];
}
public function getType(): string {
return 'Expr_Yield';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BitwiseNot.php | lib/PhpParser/Node/Expr/BitwiseNot.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class BitwiseNot extends Expr {
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a bitwise not node.
*
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_BitwiseNot';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/ArrayDimFetch.php | lib/PhpParser/Node/Expr/ArrayDimFetch.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class ArrayDimFetch extends Expr {
/** @var Expr Variable */
public Expr $var;
/** @var null|Expr Array index / dim */
public ?Expr $dim;
/**
* Constructs an array index fetch node.
*
* @param Expr $var Variable
* @param null|Expr $dim Array index / dim
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->dim = $dim;
}
public function getSubNodeNames(): array {
return ['var', 'dim'];
}
public function getType(): string {
return 'Expr_ArrayDimFetch';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Closure.php | lib/PhpParser/Node/Expr/Closure.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\ClosureUse;
use PhpParser\Node\Expr;
use PhpParser\Node\FunctionLike;
class Closure extends Expr implements FunctionLike {
/** @var bool Whether the closure is static */
public bool $static;
/** @var bool Whether to return by reference */
public bool $byRef;
/** @var Node\Param[] Parameters */
public array $params;
/** @var ClosureUse[] use()s */
public array $uses;
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
public ?Node $returnType;
/** @var Node\Stmt[] Statements */
public array $stmts;
/** @var Node\AttributeGroup[] PHP attribute groups */
public array $attrGroups;
/**
* Constructs a lambda function node.
*
* @param array{
* static?: bool,
* byRef?: bool,
* params?: Node\Param[],
* uses?: ClosureUse[],
* returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
* stmts?: Node\Stmt[],
* attrGroups?: Node\AttributeGroup[],
* } $subNodes Array of the following optional subnodes:
* 'static' => false : Whether the closure is static
* 'byRef' => false : Whether to return by reference
* 'params' => array(): Parameters
* 'uses' => array(): use()s
* 'returnType' => null : Return type
* 'stmts' => array(): Statements
* 'attrGroups' => array(): PHP attributes groups
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $subNodes = [], array $attributes = []) {
$this->attributes = $attributes;
$this->static = $subNodes['static'] ?? false;
$this->byRef = $subNodes['byRef'] ?? false;
$this->params = $subNodes['params'] ?? [];
$this->uses = $subNodes['uses'] ?? [];
$this->returnType = $subNodes['returnType'] ?? null;
$this->stmts = $subNodes['stmts'] ?? [];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}
public function getSubNodeNames(): array {
return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts'];
}
public function returnsByRef(): bool {
return $this->byRef;
}
public function getParams(): array {
return $this->params;
}
public function getReturnType() {
return $this->returnType;
}
/** @return Node\Stmt[] */
public function getStmts(): array {
return $this->stmts;
}
public function getAttrGroups(): array {
return $this->attrGroups;
}
public function getType(): string {
return 'Expr_Closure';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp.php | lib/PhpParser/Node/Expr/AssignOp.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
abstract class AssignOp extends Expr {
/** @var Expr Variable */
public Expr $var;
/** @var Expr Expression */
public Expr $expr;
/**
* Constructs a compound assignment operation node.
*
* @param Expr $var Variable
* @param Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Expr $var, Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->var = $var;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['var', 'expr'];
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Throw_.php | lib/PhpParser/Node/Expr/Throw_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
class Throw_ extends Node\Expr {
/** @var Node\Expr Expression */
public Node\Expr $expr;
/**
* Constructs a throw expression node.
*
* @param Node\Expr $expr Expression
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(Node\Expr $expr, array $attributes = []) {
$this->attributes = $attributes;
$this->expr = $expr;
}
public function getSubNodeNames(): array {
return ['expr'];
}
public function getType(): string {
return 'Expr_Throw';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/CallLike.php | lib/PhpParser/Node/Expr/CallLike.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\VariadicPlaceholder;
abstract class CallLike extends Expr {
/**
* Return raw arguments, which may be actual Args, or VariadicPlaceholders for first-class
* callables.
*
* @return array<Arg|VariadicPlaceholder>
*/
abstract public function getRawArgs(): array;
/**
* Returns whether this call expression is actually a first class callable.
*/
public function isFirstClassCallable(): bool {
$rawArgs = $this->getRawArgs();
return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder;
}
/**
* Assert that this is not a first-class callable and return only ordinary Args.
*
* @return Arg[]
*/
public function getArgs(): array {
assert(!$this->isFirstClassCallable());
return $this->getRawArgs();
}
/**
* Retrieves a specific argument from the raw arguments.
*
* Returns the named argument that matches the given `$name`, or the
* positional (unnamed) argument that exists at the given `$position`,
* otherwise, returns `null` for first-class callables or if no match is found.
*/
public function getArg(string $name, int $position): ?Arg {
if ($this->isFirstClassCallable()) {
return null;
}
foreach ($this->getRawArgs() as $i => $arg) {
if ($arg->unpack) {
continue;
}
if (
($arg->name !== null && $arg->name->toString() === $name)
|| ($arg->name === null && $i === $position)
) {
return $arg;
}
}
return null;
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Variable.php | lib/PhpParser/Node/Expr/Variable.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
class Variable extends Expr {
/** @var string|Expr Name */
public $name;
/**
* Constructs a variable node.
*
* @param string|Expr $name Name
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct($name, array $attributes = []) {
$this->attributes = $attributes;
$this->name = $name;
}
public function getSubNodeNames(): array {
return ['name'];
}
public function getType(): string {
return 'Expr_Variable';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Array_.php | lib/PhpParser/Node/Expr/Cast/Array_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Array_ extends Cast {
public function getType(): string {
return 'Expr_Cast_Array';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Unset_.php | lib/PhpParser/Node/Expr/Cast/Unset_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Unset_ extends Cast {
public function getType(): string {
return 'Expr_Cast_Unset';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/String_.php | lib/PhpParser/Node/Expr/Cast/String_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class String_ extends Cast {
// For use in "kind" attribute
public const KIND_STRING = 1; // "string" syntax
public const KIND_BINARY = 2; // "binary" syntax
public function getType(): string {
return 'Expr_Cast_String';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Object_.php | lib/PhpParser/Node/Expr/Cast/Object_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Object_ extends Cast {
public function getType(): string {
return 'Expr_Cast_Object';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Void_.php | lib/PhpParser/Node/Expr/Cast/Void_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Void_ extends Cast {
public function getType(): string {
return 'Expr_Cast_Void';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Int_.php | lib/PhpParser/Node/Expr/Cast/Int_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Int_ extends Cast {
// For use in "kind" attribute
public const KIND_INT = 1; // "int" syntax
public const KIND_INTEGER = 2; // "integer" syntax
public function getType(): string {
return 'Expr_Cast_Int';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Bool_.php | lib/PhpParser/Node/Expr/Cast/Bool_.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Bool_ extends Cast {
// For use in "kind" attribute
public const KIND_BOOL = 1; // "bool" syntax
public const KIND_BOOLEAN = 2; // "boolean" syntax
public function getType(): string {
return 'Expr_Cast_Bool';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/Cast/Double.php | lib/PhpParser/Node/Expr/Cast/Double.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Double extends Cast {
// For use in "kind" attribute
public const KIND_DOUBLE = 1; // "double" syntax
public const KIND_FLOAT = 2; // "float" syntax
public const KIND_REAL = 3; // "real" syntax
public function getType(): string {
return 'Expr_Cast_Double';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Plus.php | lib/PhpParser/Node/Expr/AssignOp/Plus.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Plus extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Plus';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php | lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class BitwiseOr extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_BitwiseOr';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php | lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class BitwiseAnd extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_BitwiseAnd';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Mod.php | lib/PhpParser/Node/Expr/AssignOp/Mod.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Mod extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Mod';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php | lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class ShiftRight extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_ShiftRight';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Div.php | lib/PhpParser/Node/Expr/AssignOp/Div.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Div extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Div';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Minus.php | lib/PhpParser/Node/Expr/AssignOp/Minus.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Minus extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Minus';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Mul.php | lib/PhpParser/Node/Expr/AssignOp/Mul.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Mul extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Mul';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php | lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class BitwiseXor extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_BitwiseXor';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php | lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class ShiftLeft extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_ShiftLeft';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Pow.php | lib/PhpParser/Node/Expr/AssignOp/Pow.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Pow extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Pow';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Concat.php | lib/PhpParser/Node/Expr/AssignOp/Concat.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Concat extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Concat';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php | lib/PhpParser/Node/Expr/AssignOp/Coalesce.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignOp;
class Coalesce extends AssignOp {
public function getType(): string {
return 'Expr_AssignOp_Coalesce';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Plus.php | lib/PhpParser/Node/Expr/BinaryOp/Plus.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Plus extends BinaryOp {
public function getOperatorSigil(): string {
return '+';
}
public function getType(): string {
return 'Expr_BinaryOp_Plus';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php | lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class BitwiseOr extends BinaryOp {
public function getOperatorSigil(): string {
return '|';
}
public function getType(): string {
return 'Expr_BinaryOp_BitwiseOr';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php | lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class BooleanOr extends BinaryOp {
public function getOperatorSigil(): string {
return '||';
}
public function getType(): string {
return 'Expr_BinaryOp_BooleanOr';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php | lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class SmallerOrEqual extends BinaryOp {
public function getOperatorSigil(): string {
return '<=';
}
public function getType(): string {
return 'Expr_BinaryOp_SmallerOrEqual';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php | lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class BitwiseAnd extends BinaryOp {
public function getOperatorSigil(): string {
return '&';
}
public function getType(): string {
return 'Expr_BinaryOp_BitwiseAnd';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Mod.php | lib/PhpParser/Node/Expr/BinaryOp/Mod.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Mod extends BinaryOp {
public function getOperatorSigil(): string {
return '%';
}
public function getType(): string {
return 'Expr_BinaryOp_Mod';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php | lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class ShiftRight extends BinaryOp {
public function getOperatorSigil(): string {
return '>>';
}
public function getType(): string {
return 'Expr_BinaryOp_ShiftRight';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php | lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class LogicalOr extends BinaryOp {
public function getOperatorSigil(): string {
return 'or';
}
public function getType(): string {
return 'Expr_BinaryOp_LogicalOr';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php | lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Spaceship extends BinaryOp {
public function getOperatorSigil(): string {
return '<=>';
}
public function getType(): string {
return 'Expr_BinaryOp_Spaceship';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Div.php | lib/PhpParser/Node/Expr/BinaryOp/Div.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Div extends BinaryOp {
public function getOperatorSigil(): string {
return '/';
}
public function getType(): string {
return 'Expr_BinaryOp_Div';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Minus.php | lib/PhpParser/Node/Expr/BinaryOp/Minus.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Minus extends BinaryOp {
public function getOperatorSigil(): string {
return '-';
}
public function getType(): string {
return 'Expr_BinaryOp_Minus';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php | lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class GreaterOrEqual extends BinaryOp {
public function getOperatorSigil(): string {
return '>=';
}
public function getType(): string {
return 'Expr_BinaryOp_GreaterOrEqual';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php | lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class LogicalXor extends BinaryOp {
public function getOperatorSigil(): string {
return 'xor';
}
public function getType(): string {
return 'Expr_BinaryOp_LogicalXor';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Equal.php | lib/PhpParser/Node/Expr/BinaryOp/Equal.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Equal extends BinaryOp {
public function getOperatorSigil(): string {
return '==';
}
public function getType(): string {
return 'Expr_BinaryOp_Equal';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php | lib/PhpParser/Node/Expr/BinaryOp/Smaller.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class Smaller extends BinaryOp {
public function getOperatorSigil(): string {
return '<';
}
public function getType(): string {
return 'Expr_BinaryOp_Smaller';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
nikic/PHP-Parser | https://github.com/nikic/PHP-Parser/blob/8c360e27327c8bd29e1c57721574709d0d706118/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php | lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php | <?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class NotIdentical extends BinaryOp {
public function getOperatorSigil(): string {
return '!==';
}
public function getType(): string {
return 'Expr_BinaryOp_NotIdentical';
}
}
| php | BSD-3-Clause | 8c360e27327c8bd29e1c57721574709d0d706118 | 2026-01-04T15:02:34.433891Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.