Ask HN: Does PHP drives you crazy?
So for the last 3 years I've been busy switching back and forth between C#/Java/C++ and latly I've been working on an Webapp in PHP.
I find doing things in PHP is absolutly tendious, yeah of course everything is easy as shit, but the inconsisticies and the way it's documented really makes my brain bleed. .. and where the hell is my little rudimentary debugger?
Don't know if there is some higher level programming style to PHP, but what do you guys think?
9 comments
[ 2.7 ms ] story [ 45.0 ms ] threadre: documentation -- a little annoying, but i've seen worse.
re: debugger -- http://xdebug.org/
re: higher level programming -- are you using a framework?
Get a good framework (Recess is the most promising, CodeIgniter is fairly sane).
The frameworks you suggest don't work around any of PHP's language inadequacies, they only work around its inability to easily write web applications. Once your HTTP requests is parsed, you still have to do something, and that's what PHP makes hard.
Nobody said anything about better languages, I don't think anyone would argue that point at all, so why you constantly feel the need to interject it in all of your criticisms of PHP, I'm not exactly sure.
http://news.ycombinator.com/item?id=579250
(To make a long story short, PHP makes all of the same mistakes as Java with respect to OO, but doesn't have the workarounds that Java does.)
Is this actionable? Why are you asking whether PHP drives us crazy, as opposed to a question like "Which language/framework should I use for building a Webapp in my spare time?" What do you plan to do with our answer?
If you are just shooting the breeze here, write a blog post! If you are going to make a concrete decision, tell us what it is so that we can give you realistic advice.
Second, polls are ridiculously biased, especially with the question you asked. Your question presumes we use PHP, it drives us crazy, and we keep using it! Do you think anyone who doesn't use PHP will say "No PHP doesn't drive me crazy because I build webapps in Erlang?"
Are you looking for PHP delelopers to tell you that they aren't crazy and to suggest why? The question is remarkably unclear.
My personal advice is to decide what decision you're trying to make and then do some research. Are you thinking of switching away from PHP? Looking for libraries/tips to make it saner? Or what? When you figure out what you want to do it should be simple to use the Internet to get answers.
Somehow though, lots of stuff you do in PHP doesn't quite feel right and you constantly get the feeling that anything can break at anytime. If you're mixing in jquery and doing lots of ajax requests, you're just cross-calling functions anywhere around some loosely tied together code. When you even have to think hard about what kind of scope your variables & code are living in, it seems hard to get solid sturucture in PHP. So I was just wondering if that happens to everybody, that dares to touch this language :>
Sure there are issues with it, just like there are issues with everything else. But I can't help noticing that people who program in PHP tend to just get things done instead of complaining about how they can't get anything done in a language that doesn't even have semi-enclosed nomads with closured scaffolding on the IO stack.