1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-27 04:14:44 +01:00

Fix pretty print of ${$a}[0]

This commit is contained in:
nikic 2011-10-16 15:25:40 +02:00
parent 4ce618643f
commit b77d66e5bd

View File

@ -358,9 +358,7 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
// Other
public function pExpr_Variable(PHPParser_Node_Expr_Variable $node) {
if ($node->name instanceof PHPParser_Node_Expr_Variable) {
return '$' . $this->p($node->name);
} elseif ($node->name instanceof PHPParser_Node_Expr) {
if ($node->name instanceof PHPParser_Node_Expr) {
return '${' . $this->p($node->name) . '}';
} else {
return '$' . $node->name;