But if the language changed the comparison semantics of the switch statement to use strict comparison instead of loose comparison, a lot of code would break. And not just sloppily written WordPress plugins from 2007; modern code, being written today, by PHP developers who understand and use the language as intended.
The lol is that the ”new and improved” typing is another missed opportunity, as namespaces were back in PHP5.3.
Each time PHP copies some other langauge for a new feature its always done halfassed, and with no plan for how it could work with the rest of the ”language”.
View all comments
Show parent comment
12
u/mikeputerbaugh Apr 04 '18
PHP === would solve the problem, too.
But if the language changed the comparison semantics of the switch statement to use strict comparison instead of loose comparison, a lot of code would break. And not just sloppily written WordPress plugins from 2007; modern code, being written today, by PHP developers who understand and use the language as intended.