7 ms·
"Raise your hand if you hate PHP" many hands go up "Keep your hand up if you've actually built a project using PHP" most hands go down But my coool poooints!!
by sequoia 13y ago
"Raise your hand if you hate PHP" many hands go up
"Keep your hand up if you've actually built a project using PHP" most hands go down
But my coool poooints!! I need to show the guys I hate PHP so they won't think I'm a newb!!
- homersapien 13y agoPHP haters are hysterical, I mean that in the clinical sense. It is powerful, flexible, blazing fast (relative, I know), and arguably the easiest (or at least most accessible) language to learn. Its flexibility is what generates most of the hate. It gives you the freedom to create some really bad/stupid code, which noobs inevitably do. But hating it because it will let you hurt yourself is like hating a table saw because it can cut your arm off.
- asdasf 13y agoThe obvious counter point is that most people who hate PHP quite like C. But C more closely fits your description of "freedom to create some really bad/stupid code" than PHP does. People hate it because it makes it more difficult to do things well, not because it makes it easy to do things poorly.
- erjiang 13y agoI'm not really sure it's fair to say that people hate PHP because of its flexibility. Many other languages are very "flexible", and much more so than PHP for some things (you're less likely to do dumb threading or malloc mistakes in PHP, for example). I think it's because PHP has a much larger surface area of questionable decisions to attack. When your core language is very, very small (e.g. Scheme), you have less to criticize, but when PHP has everything and the kitchen sink, plus a lack of an overarching philosophy or standard, plus a broken core developers community, it simply generates many more hatable things.
- falcolas 13y agoA table saw doesn't try to disguise its blade as the stop button... My favorite bug to date? Uninitialized variables being interpreted as strings. That's the one I get to debug for clients on a regular basis. "Why can't I make this DB connection?" "Because you forgot to initialize the variable containing the database name."
- kbenson 13y agoI actually hate it because it's not flexible enough. I did a few years of PHP dev and maintenance after learning and using Perl first. There's enough superficial similarities that it really makes the warts stand out. Every time I wanted to simply use a map, grep, anonymous function, or multiple items returned from a function, I was reminded of how much better it could have been if a bit more forethought was put into it.
- xtracto 13y agoI don't hate it, I just find it hilarious to have stuff like == and === ; the old 'mysql_real_escape' (I think now fixed) and other stuff like that. I wouldn't want to engage in a big project in a language as unstable as that.
- behrendtio 13y agoNot in my experience though. The people who do like PHP are the ones who started with it and didn't use it too much yet. In my exp. a lot of ruby/python/node.js devs are former PHP developers who built several websites using PHP and switched because they got pissed about PHP (or stuff that is related to PHP). More interestingly imho is the percentage of people who hate PHP but still use it most of their time, since they can't find projects with other languages. I bet that's a lot of people...
- nercury 13y agoI like Symfony2, I hate PHP. PHP has changed a lot in the last couple of years. The quality of libraries and ease of installation skyrocketed. We learned to avoid certain PHP features or built workarounds on top of them. Therefore I still hate the PHP for that. "extract" function anyone?
- jrgnsd 13y agoI like PHP. I've coded in it (and other languages) for more than 10 years. I love the ease of use and the flexibility it offers. I must however add that, like a sibling comment, I think modern frameworks like Symfony 2 is the way forward for the language in a modern web stack.
- hadem 13y agoI agree with you. Working with Symfony2 has dramatically changed how I work with PHP for the better. I know one of the major complaints people have with PHP is that developers often write poor code but it really doesn't have to be that way.
- V-2 13y agomany, most - weasel words
- MAGZine 13y agosmart words. making sweeping claims about nearly anything is real dumb.
- gaius 13y agoI used PHP when it was PHP/FI, that's "personal home page form interpreter" for you young 'uns. No-one calls me a n00b.
- adolfojp 13y agoThere might be some truth to your comment, however, the way that you wrote it makes it look like this: "Most people who disagree with me do so because they're immature, not because they have an informed opinion, so I'll just make fun of them." And that doesn't reflect well on you.
- mercurial 13y agoOh, I'm doing worse. I'm actually maintaining a project using 1999-era PHP.
- jrgnsd 13y agoMy deapest, deapest sympathies. Up until a few years back I was doing the same. It was the most unproductive years of my life.
- sejje 13y agoI'm also in this boat. Luckily it's just a small backend part of an application that got brought along. That said, I've spent an inordinate amount of time with it given its size.
- asdasf 13y ago>Anyone who disagrees with me is just ignorant! Do you have any evidence to support that notion? I find it quite the opposite. People who spent a decade being forced to use PHP know the language well, and dislike it. People who have never bothered to learn and just keep making the same mistakes over and over again defend PHP fervently, despite being almost entirely ignorant of the problems with the language.
- sequoia 13y ago>I'll invent a position from whole cloth then present it as a quote the parent comment to turn him into a straw man, then I'll have a debate with that straw man. Then I'll kick a puppy! Why would you do that? If you read my comment you'll note that I said "many hands go up" "most hands go down." I'm not saying everyone who dislikes PHP hasn't used it, merely that there's a large number of people here who dogpile on it for no reason other than "it's popular to do so" or "I'm half way thru _why's Poignant Guide so I'm pretty sure that qualifies me to comment on every programming language and why it isn't as good as ruby." Please note that: a) I use PHP but I'm not a slob, I critique bad PHP freely[0] and b) people are coming out of the woodwork saying 'yeah I don't use PHP but I downvoted it'[1] so I think it's fair to say my original assertion (many people are "disliking" PHP from an uninformed position, merely because it's popular) stands. [0] https://news.ycombinator.com/item?id=6510051 https://news.ycombinator.com/item?id=6510051 < note how this thread goes from (in my opinion) a salient, relevant discussion of the codebase and how to improve it to "durr php suxx" circle jerk in approximately 2 comments. [1] https://news.ycombinator.com/item?id=6528073 https://news.ycombinator.com/item?id=6528073 "I voted dislike to PHP despite not having used it." EDIT: trigger warning- more sarcasm | Here are some more thoughtful, informed, salient comments about PHP that really add to the discussion and aren't just "lol php suxx amirite??": https://news.ycombinator.com/item?id=6527334 https://news.ycombinator.com/item?id=6527334 https://news.ycombinator.com/item?id=6528288 https://news.ycombinator.com/item?id=6528288 https://news.ycombinator.com/item?id=6527280 https://news.ycombinator.com/item?id=6527280
- thatthatis 13y ago1) his comment was a reasonable paraphrase. 2) if you'd said "many" instead of "most" your later points would hold better. What basis, aside from hopefulness, do you have for assuming that most people who have a bias against php haven't used it? After HTML, CSS, and JavaScript it is the most ubiquitous language for the web: ergo, most web people have probably had exposure to it. My bias: I hate php. I've deployed a few dozen sites that use it over the years.
- kshay 13y agoActually, my dislike of PHP is entirely based on using it. If I hadn't had to "build projects" in it, I wouldn't care one way or the other.
- locofacetwice 13y agoPff this is total bs. Most people who dislike PHP actually started doing webdev using php.
- damncabbage 13y ago7 years of PHP projects: old, messy, legacy and new and fresh. I loathe PHP and never want to use it ever again. Most I've talked to in person (yes, plural of anecdote is not data, etc) hate PHP because they've had a wonderful first-hand experience with it. This is in Sydney (Australia), where Ruby and Node is a relatively recent phenomenon compared to SF and the like. Your post could do without the shitty attempt at sarcasm, but you've likely figured that out already.
- josephlord 13y agoI voted dislike to PHP despite not having used it. I read an article listing a fairly significant number of fairly fundamentally broken thing and gotchas many of which fail silently and keep running corrupting data and I decided that I didn't want to go near it. I don't want to use it and even go to the extent of avoiding open source software that does. It isn't about cool points but purely about whether I want to use the language. I like types and type checking and halting with exceptions on errors. Do I think that makes me cool; no, but it does make me dislike PHP and use Postgres rather than MySQL (even before my Oracle aversion became relevant). Edit: This was the article: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...