Quantcast
Channel: PHP vs .Net » PHP
Viewing all articles
Browse latest Browse all 10

Defend PHP

$
0
0

I ran across a great discussion at StackOverflow today that started with this question:

I made a tongue-in-cheek comment in another question thread calling PHP a terrible language and it got down-voted like crazy. Apparently there are lots of people here who love PHP.

So I'm genuinely curious. What am I missing? Why makes PHP a good language?

The article lists a dozen or so "flaws" with the language, and then continues:

Worst of all, PHP convinces people that designing web applications is easy. And it does indeed make much of the effort involved much easier. But the fact is, designing a web application that is both secure and efficient is a very difficult task.

By convincing so many to take up programming, PHP has taught an entire subgroup of programmers bad habits and bad design. It's given them access to capabilities that they lack the understanding to use safely. This has led to PHP's reputation as being insecure.

Are the flaws in PHP really any different from any other language?

I'm a C# programmer, and I have to disagree with what some of what the original poster asserted were flaws with PHP.  Overly broad implicit type conversions?  Too easy to couple presentation with logic?  Heck, those are the reasons it's so popular in the first place!  Making web programming easy is a flaw?  Wut?

After wrestling with the back and forth in that discussion, I came to a simple conclusion.    This person has fallaciously concluded that PHP is a bad language based on his perception of its compliance with ivory-tower, computer science academia concepts.   Most of his criteria could basically describe Perl, Javascript, VBScript, heck, even VB6, HTML and C.

Of course PHP isn't a horrible language.  It's simply a tool, and based on its wild popularity and simple learning curve, only a fool could conclude that it was a bad one.  Even if it breeds more "unsafe programmers" (which I doubt highly), it's simply not the language's responsibility to restrict what you can do just because you might do it.

Every programmer should be able to see that.


Viewing all articles
Browse latest Browse all 10

Trending Articles