找出switch分支里的bug

来自PHP语言基础
PHP 8.3.33 入门 4分钟 找出1处问题

为什么labelStatus传入paid时会返回closed?

php
<?php
function labelStatus(string $status): string
{
    $label = 'unknown';
    switch ($status) {
        case 'paid':
            $label = 'ready';
        case 'cancelled':
            $label = 'closed';
            break;
    }
    return $label;
}
在试验场中打开
报告错误