php/doc-en
Wrong result in complex comparisons switch's example's result
Ouverte
#1 682 ouverte le 5 juil. 2022
good first issue
Métriques du dépôt
- Stars
- (596 étoiles)
- Métriques de merge PR
- (Merge moyen 99j 23h) (90 PRs mergées en 30 j)
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"