php/doc-en

Wrong result in complex comparisons switch's example's result

オープン

#1,682 opened on 2022/07/05

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)XML (882 件のフォーク)auto 404
good first issue

Repository metrics

Stars
 (596 個のスター)
PR merge metrics
 (平均マージ 99d 23h) (30d で 90 merged PRs)

説明

From manual page: https://php.net/control-structures.switch

Where it reads: For more complex comparisons, the value true may be used as the switch value. Or, alternatively, if-else blocks instead of switch.

The example's result is: // Prints "C"

Shouldn't it be?: // Prints "B"

コントリビューターガイド