Re:PHP introduces "goto"
by prodigal_erik on Tuesday June 09, 2009 @11:22PM
(#650499)
PHP has to look up variables by name at runtime, because it doesn't know which ones will really exist, much less their types. It doesn't know whether any array will be used as an ordered list or a lookup table, so it has to maintain a complex data structure for both. It has to allow any value to actually be a reference which shares state with any other value. These are very expensive features which preclude a lot of optimizations, yet they're rarely used because they're more often surprising than helpful. We ported an app server from PHP to Java and picked up a 6x speed improvement with hardly any tuning.
And 0 == "" isn't really confusing. You want confusing?
And 0 == "" isn't really confusing. You want confusing?
The real problem with PHP is there's no simple way to stop it from guessing what you might have wanted when it's utterly wrong.