

Ask HN: Does PHP drives you crazy? - zyb09

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.<p>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?<p>Don't know if there is some higher level programming style to PHP, but what do you guys think?
======
raganwald
What do I think? Honestly?? Meta-answer: The choice to conduct a poll to ask
what HN members think of PHP is not the best wayto move forward.

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.

~~~
zyb09
I don't wanna poll anybody, sorry if there was a misunderstandig. I'm not
trying to build some Webapp in my spare time here. I've written now tons of
PHP in the last 3-4 weeks on an internal project and it's pretty much running
and functional by now. Definitely not in a phase we're I wanna switch
frameworks or something.

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 :>

------
mixmax
Well it seems to be very fashionable to bash PHP these days, but you know
what? It works, and it works well. It scales well, some of the webs largest
sites are programmed in PHP, it's free, it has loads of libraries, it's
mature, you can always find help and free code on the net, and PHP.net has the
best documentation I've seen for a programming 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.

------
jrockway
Yes, PHP is bad. I ranted about this in the past:

<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.)

------
noodle
re: driving me crazy -- nope.

re: documentation -- a little annoying, but i've seen worse.

re: debugger -- <http://xdebug.org/>

re: higher level programming -- are you using a framework?

------
jawngee
I think if PHP is driving you crazy, you're doing it wrong.

Get a good framework (Recess is the most promising, CodeIgniter is fairly
sane).

~~~
jrockway
I think if PHP _isn't_ driving you crazy, you're doing it wrong. The only way
to win is to not play.

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.

~~~
jawngee
Dude if PHP is hard for you then you have a serious brain deficit.

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.

------
trickjarrett
Joy of joys, another language rant.

