NOTICE:
This content is in the "archives" of Gadgetopia. It has been moved to this subdomain as it is no longer considered relevant to the site. It is being hosted here for a indeterminate period of time. Its existence at this URL is not guaranteed, and it may be removed at any time. If you would like to refer to this content in the future, you are encouraged to save it to your local file system.

Why PHP (is Awesome|Blows)

Originally published by "dbarker" on 2009-09-04 09:41:00Z

Why I switched from PHP to Python : Here’s the best description I’ve heard yet for why PHP is the way it is (emphasis mine).

What makes PHP, as a language, awesome is also what makes it horrible to work with, which is that it’s not really a language, but rather a giant plugin architecture for exposing lower level libraries in a high level fashion. Most of the language that developers use are, in fact, thin wrappers around popular C functions (curl, mysql, gd, etc.). Most of the time these libraries’ functions are simply exposed as-is. Anyone who’s coded curl in C will feel right at home while using curl from PHP. The problem with this is it leads to wildly inconsistent API’s.

The whole article is a great comparison of Python and PHP.  Worth reading.

Comment by "Mark" on 2009-09-04 16:04:00Z
He was doing good until he said this: "Finally, a stark difference between PHP and Python is that Guido, essentially, treats the developers as adults while PHP puts significant effort into protecting developers from themselves (I'm looking at you safe_mode)." If you have ever programmed in Ada you'll know that hand holding is to the extreme yet DOD companies have no problem using it. Not to mention every academic and real world programmer will tell you it's a real language. It's a language of pain but still a real one. Personally, I can't believe the sheer volume of time and effort spent on which language is better. Like arguing about Linux, BSD, MS, Apple etc etc. Use what works best for you and your needs. Period.
Comment by "qwerty" on 2010-08-21 10:32:00Z
PHP is a hacked up pile of garbage. PHP makes it easy to do the wrong thing and puts up lots of roadblocks up to make it hard to do the wrong thing. Lack of namespaces, crappy thread support, non-regularity and non-orthogonality are more reasons to never use PHP. There is NEVER a good reason to use PHP. Not ever.
Comment by "Martin Mathilda Shaw" on 2011-04-11 11:37:00Z
PHP IS AWESOME, THE ONLY REASON MANY PEOPLE DO NOT LIKE IT IS BECAUSE IT ALLOWS WEBMASTERS (ADMINISTRATORS) TO STOP HACKERS AND TO CREATE MORE SECURE WEBSITES, PHP WILL EVENTUALLY PUT A STOP TO HACKERS ATTEMPTING TO USE OTHER SITES RESOURCES. AS AN WEBSITE ADMINISTRATOR MY SELF I SAY "HELL YES!!!".
Comment by "Zack" on 2011-05-07 08:33:00Z
"PHP IS AWESOME, THE ONLY REASON MANY PEOPLE DO NOT LIKE IT IS BECAUSE IT ALLOWS WEBMASTERS (ADMINISTRATORS) TO STOP HACKERS AND TO CREATE MORE SECURE WEBSITES, PHP WILL EVENTUALLY PUT A STOP TO HACKERS ATTEMPTING TO USE OTHER SITES RESOURCES." The National Vulnerability Database equates some 40% of their database to PHP related security holes. [http://nvd.nist.gov/](http://nvd.nist.gov/) Each release has shown significant gains from a "meager" 28% with version 3.0 to current inception. Sorry, but hackers will continue to proliferate as long as PHP remains as qwerty said, "[a] pile of gabarge".
Comment by "Michael Ellis" on 2011-07-17 07:44:00Z
Qwerty is absolutely correct. The people who created, maintain and continue to promote PHP have set software engineering back by years. PHP is like a powerful narcotic. It feels great at first, but the more you use it the more you destroy yourself.