diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index 97f4172f..241f22a8 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -405,6 +405,9 @@ class CompilerBase extends \PhpAot\Core\Translator $type = $expr->getType(); switch ($type) { case self::EXPR_VARIABLE: + if (is_object($expr->name) and $this->isVarExpr($expr->name)) { + $this->fatalError($expr, 'The `$$` syntax is not supported'); + } return $this->escapeVarName($expr->name); case 'Name': case 'VarLikeIdentifier':