php/doc-en

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

开放

#1,682 创建于 2022年7月5日

 (3 条评论) (0 个反应) (0 位负责人)XML (882 个派生)auto 404
good first issue

仓库指标

星标
 (596 个星标)
PR 合并指标
 (平均合并 99天 23小时) (30 天内合并 90 个 PR)

描述

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"

贡献者指南