When you have dynamically typed languages, whether to coerce or not is a design decision with usability trade-offs. Javascript exhibits pretty similar behavior with switch statements for exactly the same reason: it also has two types of equality comparisons.
Also, PHP allows you to add explicit type casting to case statements. e.g.,
Also, PHP allows you to add explicit type casting to case statements. e.g.,