php/doc-en
Wrong result in complex comparisons switch's example's result
Aberta
#1.682 aberto em 5 de jul. de 2022
good first issue
Métricas do repositório
- Stars
- (596 estrelas)
- Métricas de merge de PR
- (Mesclagem média 99d 23h) (90 fundiu PRs em 30d)
Description
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"