
Defend PHP; convince me it isn't horrible - ryanwaggoner
http://stackoverflow.com/questions/309300/defend-php-convince-me-it-isnt-horrible/
======
zdw
I wouldn't call it horrible... I'd say it has a lot of warts.

There are some very solid bits of code out there in PHP - Wordpress and Drupal
being the foremost ones I've used.

You can generally survive with the base library, which tends to have nearly
everything you'd want in it - compare to Perl or others which you'll be
running to modules the first time you need to process XML, do graphics
manipulation, or connect to a database, and often have to bug your sysadmin to
do this...

PHP is a station wagon - not sexy, but gets the job done.

~~~
ryanwaggoner
_There are some very solid bits of code out there in PHP - Wordpress_

Uh-oh...cue the hordes of people whining about Wordpress's security.

~~~
tptacek
Why wouldn't they? What could possibly be so hard to implement about a blog
that would create such a track record?

------
Myrth
1\. That's a 1 year old post

2\. English language is horrible as well (theoretically)

3\. I'd try to convince anyone, but it would waste highly valuable time making
nice income developing in PHP :)

------
d0m
Great programmers will write pretty code in any languages.

However, I think that poor programmers will write more ugly code in PHP than
in python/django for instance.

So, if you compare the overall quality, PHP loses.

Also, it seems that these days, great programmers use clojure/python/ruby/arc
instead of PHP.. so that doesn't help PHP quality ratio (As poor programmer
using PHP will continue to use PHP since they would never ever be willing to
learn a new language).

I've recently worked with the most ugly code of my life. 1000 lines function,
bad indentation, 8 levels of if/foreach, wrong OO, lots of repitition, etc.
Guess what, it was written in PHP. Does it prove something? No. Does it make
me like PHP? Really not.

That being said, I've seen some pretty clean PHP code and I even had some fun
with it.

~~~
julius_geezer
Only a 1000 lines? Man, you are living the easy life.

------
chrisaycock
I like the comment: "poor programmers get very defensive about their language"

------
petervandijck
I like php. I like functions too (as opposed to objects). I'm probably just
old school. I also like my car, which doesn't have a motor to move the windows
up and down, and doesn't have a remote to lock the doors, but it works great.

------
jmathai
If you can be convinced that PHP is horrible then you're probably better off
using Ruby on Rails.

