Skip to content

Blade escaped interpolation @{{...}} incorrectly reported as PHP syntax error #419

Description

@nguyentranchung

Problem

PHPantom reports a syntax error for Laravel Blade's escaped interpolation syntax:

@{{.Image}}

Diagnostic:

Syntax error: unexpected token phpantom(syntax_error)

Expected behavior

In Blade, prefixing the echo syntax with @ escapes it. @{{ ... }} outputs a literal {{ ... }} expression instead of treating it as a Blade/PHP interpolation. This is commonly used for frontend template expressions, such as Vue, Alpine, or another JavaScript templating engine.

PHPantom should recognize @{{.Image}} as escaped Blade text and should not report a PHP syntax error for it.

Actual behavior

The escaped interpolation is treated as invalid PHP/Blade syntax and produces an unexpected-token diagnostic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions