Skip to content

break(1); / continue(1); with a parenthesized level fails to parse: "expected ';' after break". #618

Closed

Description

@blacktrs

Summary

break(1); / continue(1); with a parenthesized level fails to parse: "expected ';' after break".

Repro

<?php
// reported in #614 (mpdf/mpdf)
foreach ([1, 2, 3] as $i) { if ($i === 2) { break(1); } echo $i, "\n"; }

Expected (php)

1

Actual (manticore c421455f, Darwin arm64)

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

Tracking

Known-bug repro: tests/aot/repro/wrong/break_continue_parenthesized_level.php — bash tests/aot/xfail.sh -k break_continue_parenthesized_level 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
    wrong-answer
    on Nov 10, 2026
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

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions