Skip to content

Instantly share code, notes, and snippets.

@Juddling
Created July 22, 2015 19:08
Show Gist options
  • Select an option

  • Save Juddling/f2ea8f089c2ac12d8936 to your computer and use it in GitHub Desktop.

Select an option

Save Juddling/f2ea8f089c2ac12d8936 to your computer and use it in GitHub Desktop.
AST dump
Array
(
[0] => PhpParser\Node\Stmt\Function_ Object
(
[byRef] =>
[name] => combine
[params] => Array
(
[0] => PhpParser\Node\Param Object
(
[type] =>
[byRef] =>
[variadic] =>
[name] => x
[default] =>
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 3
[endLine] => 3
)
)
[1] => PhpParser\Node\Param Object
(
[type] =>
[byRef] =>
[variadic] =>
[name] => y
[default] =>
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 3
[endLine] => 3
)
)
)
[returnType] =>
[stmts] => Array
(
[0] => PhpParser\Node\Stmt\Return_ Object
(
[expr] => PhpParser\Node\Expr\BinaryOp\Plus Object
(
[left] => PhpParser\Node\Expr\Variable Object
(
[name] => x
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 4
[endLine] => 4
)
)
[right] => PhpParser\Node\Expr\Variable Object
(
[name] => y
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 4
[endLine] => 4
)
)
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 4
[endLine] => 4
)
)
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 4
[endLine] => 4
)
)
)
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 3
[endLine] => 5
)
)
[1] => PhpParser\Node\Stmt\Echo_ Object
(
[exprs] => Array
(
[0] => PhpParser\Node\Expr\FuncCall Object
(
[name] => PhpParser\Node\Name Object
(
[parts] => Array
(
[0] => combine
)
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
[args] => Array
(
[0] => PhpParser\Node\Arg Object
(
[value] => PhpParser\Node\Scalar\LNumber Object
(
[value] => 2
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
[byRef] =>
[unpack] =>
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
[1] => PhpParser\Node\Arg Object
(
[value] => PhpParser\Node\Scalar\LNumber Object
(
[value] => 4
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
[byRef] =>
[unpack] =>
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
)
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
)
[subNodeNames:PhpParser\NodeAbstract:private] =>
[attributes:protected] => Array
(
[startLine] => 7
[endLine] => 7
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment