Skip to content

Alternative switch syntax (switch (...): ... endswitch;) fails to parse: "expected '{' in switch body". #622

Closed

Description

@blacktrs

Reported in #614 (item 4). Blade compiles @switch into exactly this form, so every precompiled view using @switch fails.

<?php
$m = 'card';
switch ($m):
    case 'card': echo "card\n"; break;
    default: echo "other\n";
endswitch;

php 8.5: card · manticore 0.18.0: parse failed: expected '{' in switch body

Fixed on branch wordpress (unmerged): 499acfa3, test tests/aot/cases/switch_alt_syntax.php.

Activity

  1. added
    bug
    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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions