Linked by Kroc Camen on Sat 20th Dec 2008 17:54 UTC
General Development IBM delves into what's new in PHP 5.3: Part-1 shows you the changes to the object-orientated capabilities, and Part-2 shows you the exciting new possibilities with real closures and lambda functions. ["Read more" for Kroc's personal commentary]
Thread beginning with comment 340907
To view parent comment, click here.
To read all comments associated with this story, please click here.
DrillSgt
Member since:
2005-12-02

"I don't really understand why there's so much disdain for PHP. Granted, I wouldn't want to try writing a desktop GUI app with it - but I wouldn't want do that with BASH scripting either."

The disdain, I am guessing, is that too many people try to use it for things it is not designed for. PHP is a server side scripting language for the web. The main purpose when it was designed was to do things you would otherwise need cgi-bin access for, like page counters, etc. It is not for nor intended to be used for writing a desktop GUI application. JavaScript is better suited to that task as it is a client side language, and the code is executed on the local machine instead of on the server. Each has it's own purpose. Too many people try to take one or the other and do everything with it, then bitch about it when it does not work or is too hard to do what they wanted to do. If the right tool was picked in the beginning, this would rarely be an issue.

Reply Parent Score: 5

tyrione Member since:
2005-11-21

"I don't really understand why there's so much disdain for PHP. Granted, I wouldn't want to try writing a desktop GUI app with it - but I wouldn't want do that with BASH scripting either."

The disdain, I am guessing, is that too many people try to use it for things it is not designed for. PHP is a server side scripting language for the web. The main purpose when it was designed was to do things you would otherwise need cgi-bin access for, like page counters, etc. It is not for nor intended to be used for writing a desktop GUI application. JavaScript is better suited to that task as it is a client side language, and the code is executed on the local machine instead of on the server. Each has it's own purpose. Too many people try to take one or the other and do everything with it, then bitch about it when it does not work or is too hard to do what they wanted to do. If the right tool was picked in the beginning, this would rarely be an issue.


And if I'm going to write a Desktop GUI application, I'll write for the platform I'm developing on and use their native Frameworks, none of which are Javascript. Both PHP and Javascript lose their value when they try to play the role of other languages; and completely lose credibility when they proclaim themselves better choices.

Reply Parent Score: 1

DrillSgt Member since:
2005-12-02

"And if I'm going to write a Desktop GUI application, I'll write for the platform I'm developing on and use their native Frameworks, none of which are Javascript. Both PHP and Javascript lose their value when they try to play the role of other languages; and completely lose credibility when they proclaim themselves better choices."

I agree. My wording was off a bit, though pretty much meant the same thing.

Reply Parent Score: 2

Bill Shooter of Bul Member since:
2006-07-14

Languages don't have credibility. They're tools. Just cause a monkey wrench sucks for cutting a piece of lumber doesn't mean it "loses all its credibility". Maybe the manufacturer loses credibility. Maybe the person recommending monkey wrenches for cutting wood loses credibility. But not the tool, its still great for 'fixing' monkeys and smashing walnuts into a gazillion pieces.

Seriously, if anyone proclaims php or javascript to be a better gui builder than native frameworks. They lose credibility.

Reply Parent Score: 2

StephenBeDoper Member since:
2005-07-06

I had long been curious if there was some argument against PHP that was obvious only to more-experienced coders.

But I had the general impression that you outlined - it does seem that many of the anti-PHP complaints comes from people who are trying to use it in situations where it's not the right tool for the job.

Reply Parent Score: 2

sbergman27 Member since:
2005-07-24

The disdain, I am guessing, is that too many people try to use it for things it is not designed for.
...
It is not for nor intended to be used for writing a desktop GUI application.

Can you point to examples of this? While I realize that the php interpreter can run standalone on a desktop box, I hardly think you can blame PHP's reputation on the vanishingly small number of cases where someone actually tries to use it that way.

PHP has a bad reputation bacause it has traditionally dumped hundreds of identifiers into a single name space, and eschewed objects (among other things). Until, of course, it got superficial bolt-on name spaces and superficial bolt-on object orientation to cover those bullet points. PHP has been the very archetype of the negative things people mean when they derisively refer to "scripting languages".

Personally, I think that PHP has what defenders it does because a lot of people got their programming start with it and really buy into the marketing about it now being object oriented.

PHP has the reputation it has because it was designed, as you say, for web page hit counters, etc. and then people started trying to write large and complex *server-side* applications because it was all they had, or at least they thought it was. And while successive versions have addressed some of the buzz word bullet points, it *still* sucks for writing real applications. For real work, use Django or RoR instead. Or Java, if you're into that and don't care about carpal tunnel syndrome.

Edited 2008-12-21 20:32 UTC

Reply Parent Score: 2

DrillSgt Member since:
2005-12-02

"PHP has the reputation it has because it was designed, as you say, for web page hit counters, etc. and then people started trying to write large and complex *server-side* applications because it was all they had, or at least they thought it was. And while successive versions have addressed some of the buzz word bullet points, it *still* sucks for writing real applications. For real work, use Django or RoR instead. Or Java, if you're into that and don't care about carpal tunnel syndrome."

Well, it was not all they had, but it was easier to use than perl, especially if your host did not provide you cgi-bin access, which not all did back then. RoR and Django came late to the party, with PHP being in use since 1995, and RoR and Django not showing up until 2005. Very few companies or developers will rewrite applications that work just because a new language is out.

Reply Parent Score: 2