5 ms·
Such hate. By far not as bad as you portray. Have you attempted the 8th level of hell that is PHP?
by hawleyal 10y ago
Such hate. By far not as bad as you portray. Have you attempted the 8th level of hell that is PHP?
- frenchy 10y agoBack in the day when I was just learning to program, I wrote a BBcode library in JavaScript. Not knowing any better, I made very liberal use of globals throughout my code. I later went to go port my code to PHP 4 (that was current at the time). To my surprise I was getting all these errors about how crappy of a programmer I was (both from globals and from misspellings and related problems). I'm honestly not sure how people hate PHP so hard and yet don't mind JavaScript.
- quicklyfrozen 10y agoFor me it was things like "function_returning_array()[0]" working in JS but not PHP and other unexpected parsing weirdness like that. (Though I don't really mind PHP, just much of the code written in it :-) )
- Joeri 10y agoPHP7 is ok. They rewrote the parser to use a real AST which fixed a lot of the weirdness and inconsistency, threw out a ton of deprecated stuff, and made error situations saner by replacing errors by throwables. I like also that php is gradually getting strict typing as an option. Function signatures are strictly typed now, with class properties getting it soon. Plus, PSR guidelines have made the popular libraries object-oriented, namespaced and consistent. My main complaint with php these days is that it's starting to look too much like java with dollar signs.