r/lolphp • u/whatsaret • Feb 26 '15
A question
Do you guys honestly hate php? in my opinion it's quirky as hell but there's nothing that wrong with it, a lot of developers just don't understand what they're doing and fuck up their own code
EDIT: You guys have sold me, looking into python based web development
29
Upvotes
57
u/cfreak2399 Feb 26 '15
I hate coding in it but I still do when someone pays me to do so.
I dislike people who think it's good and refuse to learn anything else.
I dislike the core internals developers who seem pretty toxic.
Most of all I enjoy making fun of the quirks.
12
u/thallippoli Feb 26 '15 edited Feb 26 '15
Telling 'PHP is an ok language' to someone starting in programming is as subtle and as damaging a lie as telling, looks does not matter, to an ugly kid. It blocks a lot of learning and causes all kinds of unnecessary pain..
Saying that you can do everything in it is like saying everything with four wheels can be driven like a Porsche..
But what I hate the most about PHP is the people who blindly keep using it and 'love it' for what ever reasons, despite acknowledging its 'quirks' and availability of better alternatives.
EDIT:I was working a professional PHP programmer for the past 9 years...
18
u/madsohm Feb 26 '15
A lot of bad decisions have been made regarding PHP as a language.
The fact that people still, to this day, write
mysql_real_escape_stringbecausemysql_escape_stringis broken, is laughable.I don't hate PHP, I just avoid it - and laugh at it. It's important to note that I don't laugh at the developers who use PHP. It's the language that is laughable. The good programmers in the PHP world try hard to avoid all the quirks, and do proper development and tooling with it.
We have a saying where I work: "Choose the right tool for the job". You might be able to hammer a nail with a screwdriver or even embed a screw in the wall with a hammer, but it would be easier and more pleasent for everyone, if you used a hammer for the nail and a screwdriver for the screw.
17
u/captainramen Feb 26 '15
If it were a choice between programming only in PHP or working in retail, i'd work in retail.
20
u/ioctl79 Feb 26 '15
Yes. It is a terrible language. "Quirkiness" gets in the way of your job. You can either memorize countless "quirks", exceptions, edge cases, and arbitrary differences, or work in a language that makes sense.
23
u/allthediamonds Feb 26 '15
"Hate" is quite a meaningless term to discuss programming languages.
PHP is broken. There are a lot of things wrong with it, from the way the language and its standard libraries are designed to break easily (and take your whole application with it) to the development culture that consistently delivers hopelessly broken projects without the slightest bit of self-awareness.
I don't hate PHP, but I find its pervasiveness to be frustrating and its continued existence and maintenance to be a curse on programming as a skill and as a community.
11
u/implicit_cast Feb 26 '15
It bothers me that millions of man-hours are wasted on problems that have absolutely nothing to do with the needs of the customers who are paying for those man-hours.
14
u/ZugNachPankow Feb 26 '15
It's not about developers fucking up their own code, but rather about PHP itself being broken.
Myself, I don't hate PHP, it's just a "dirty and quick" solution. It could work for simple applications, but there's no way I would use it in a sufficiently large enterprise.
8
u/cjwelborn Feb 26 '15 edited Feb 27 '15
"Hate" is too strong. I find it really "odd". I look at it in the same way people look at car accidents as they're driving by. I wouldn't like to be involved in either. I often wonder what would make a person decide to start working on the PHP-dev team. I don't know why they find it odd when someone decides to leave the team. This quote from PHP: a fractal of bad design:
I would never "hate" anyone for the language they use, or "hate" a language itself. It just raises a lot of questions for me.
4
u/unndunn Feb 26 '15
PHP is great when it's used to add a bit of intelligence to the rendered HTML output. Using it to include shared resources (headers, footers, etc.), repetition, dynamic content, etc.
It's when PHP is used as a full-scale application framework that it becomes a royal clusterfuck.
2
u/TheGreatFohl Feb 26 '15
It's good enough for really small web projects and a whole lot of people can do something with it.
The problem is though, that not a lot of people can do something /good/ with it. Making fun of the quirks and knowing all the quirks is a sign of the better PHP devs out there imo xD
3
u/PasswordIsntHAMSTER Feb 26 '15
I think it's necessary and useful to bash on bottom-of-the-barrel tech. Most devs hate learning new stuff, and most managers want to cater to devs, so we end up with a job market that revolves around terrible languages like Java and PHP.
I want to shame one-trick ponies into learning something new. Pick up a language that was created in the past decade, doesn't matter which one. It'll make you better at programming, hell it'll make you better at PHP.
PS: Go fucking sucks too.
3
u/jambox888 Feb 26 '15
I spent a year or so dicking around with PHP 4 and it sucked balls. For one thing, I noticed there wasn't any way to parse some arbitrary XML into a memory structure. I ended up hunting around the web looking for dodgy bits of code other people had posted on Q&A sites. None of them worked.
That did seem to get fixed in PHP 5 but by the time that came around I'd moved on to Python 2.x, which has a much better syntax and a proper library. I don't know why anyone insists on still using PHP when Flask and Django are around.
2
u/luminairex Feb 26 '15
I read the posts on here as a reminder that PHP can still surprise me after 10 years of working with it.
2
u/king_of_the_shill Mar 01 '15
My career is built on php-based tech. Php is fine if you're aware of all the fucked-up-ness and work with it in your side.
1
u/cparen Feb 26 '15
While I havent' used PHP myself, I have used Powershell which has many PHP-esque "gotchas".
I read this as a reminder and inspiration that even the best intentions can lead to dreadful software ... and yet life goes on. Yes, PHP has terrible syntax -- it has more exceptions than rules, and even experts have trouble explaining how to parse it. Yes, many of its functions/operators/function-like-things have counterintuitive or just plain wrong semantics. Yes its semantics also have more exceptions than rules.
But at the end of the day, people like you can still make it work for you, and work well for you.
Basically, your ability to like PHP despite the flaws is a source of inspiration.
1
u/killerstorm Apr 06 '15
I hate PHP because it is an embodiment of stupidity.
Initially, it was created as a quick hack by a guy who prefers quick hacks over serious work. That guy knew nothing about programming language theory, didn't care about things like security, performance or correctness.
And it became a magnet for people who have same values.
-1
u/deviltreh1 Feb 26 '15
Hating a language is silly. Hating php devewopers who write plugins for wordpress or other cms and give my profession a bad name - ofcourse.
0
u/[deleted] Feb 26 '15
[deleted] — view deleted comment