This may appear 'retarded' until you understand how type conversion works. Then those examples are perfectly logical and expected. PHP has === if you want to disable the type conversion in the conditional operator.
Well then use ===, but when a string contains numbers then php will do the type conversion for you. It's a convenience.
It may not work correctly by your definition but it's pretty intuitive and useful the way it is.