Skip to content

Eval ignores closing tag #127

Closed
Closed
@thiagorb

Description

@thiagorb

Input:

echo "hello"; ?> world

Running the code above in PHP's eval would result in:

php > eval('echo "hello"; ?> world');
    hello world

But the parser is failing with syntax error.

I also noticed that the following code will not result in error, and generates an AST with no children, while it should contain '?>?>' as inline:

parser.parseEval(`?>?>?>`)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions