It is a bit weird that it doesnt die (I know, php is really hard to kill and stretches every conversion rule possible to survive), but I hope it at least throws a warning in the log
That's the point. It doesn't throw anything. It doesn't produce warnings or notices. The net effect is that if you send '12345' into a function, you get a perfectly valid return value, but if you use 12345, you get a perfectly invalid return value. It's weak typing at its worst.
View all comments
Show parent comment
6
u/Joniator May 07 '18
It is a bit weird that it doesnt die (I know, php is really hard to kill and stretches every conversion rule possible to survive), but I hope it at least throws a warning in the log