6 ms·
"PHP does not remove dangerous or objectively ugly language features." I hate to defend PHP, but they have removed some dangerous features. Over the years the
by nemo 12y ago
"PHP does not remove dangerous or objectively ugly language features."
I hate to defend PHP, but they have removed some dangerous features. Over the years there have been a lot of dangerous hacks that were deprecated and eventually killed. register_globals was deliberately disabled, breaking a lot of old PHP. Magic quotes got removed (though PHP's morass of variable escaping is still a tar pit). PHP 6 (or maybe 7 depending on the number they decide to go with) will kill mysql in favor of mysqli which will help enforce the use of placeholders/prepared statements (you can still screw it up, but you have to work harder). They could do better, but they have been improving in removing dangerously broken features, and have broken back-compatibility over and over to do so. I actually hate PHP, but when I've had to use it, PHP 5.5/5.6 isn't nearly as dangerous/broken as PHP used to be (though it's still horrible).
- allendoerfer 12y agoThey have had PDO since nearly ten years now and are just now thinking about removing the worst of the other two worse DB APIs they put in the standard library. Instead of deprecating they were busy copying every language construct they could find. Even if you want to stay backwards compatible, what is so hard about deprecating it and moving the dangerous feature out of the standard library into a module after 2 years? I give them, that they are slowly changing now (probably because they can not come up with further constructs), but for a while they still deserve the rants.
- nemo 12y agoIf you said "PHP isn't aggressive enough in removing dangerous or objectively ugly language features" I'd be with you 100%. I was just pointing out that they do sometimes pull some, though I'd agree they could do better. I don't use PHP unless its a requirement and have declined nice paying job offers because PHP was involved (a 5.5/Laravel port from legacy code) so I no longer stay on top of things (don't really do Perl either anymore), but I was under the impression that they were killing a lot of deprecated legacy cruft in PHP 6/7.