Skip to content

A line comment ends at the closing tag, so a trailing comment before it still closes PHP mode #431

Closed

Description

@blacktrs

Summary

A line comment ends at the closing tag, so a trailing comment before it still closes PHP mode.

Repro

<?php
$a = 1;
if ($a) : // open ?>
yes
<?php endif; // close ?>
done

Expected (php)

yes
done

Actual (manticore 03e183b6, Darwin arm64)

compile failed (rc=65):
tests/aot/repro/crash/line_comment_closing_tag.php:6:1: error: expected ';' after expression
Found 1 error(s), 0 warning(s).
tests/aot/repro/crash/line_comment_closing_tag.php: parse failed: expected ';' after expression at line 6, column 1
compile: front-end (parse/typeck/IR) returned null (rc=65)

Tracking

Known-bug repro: tests/aot/repro/crash/line_comment_closing_tag.php — bash tests/aot/xfail.sh -k line_comment_closing_tag reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    crash
    on Oct 24, 2026
  2. blacktrs commented on Oct 26, 2026

    @blacktrs
    ContributorAuthor

    Fixed in cd3558d (merged via PR #461).

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

    bugcrash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions