Why Use PHP
Moderator: General Moderators
Why Use PHP
How would you compare working in PHP with working in ColdFusion?
Re: Why Use PHP
About a million times better.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Why Use PHP
I think the race has come down to PHP and ASP -- ColdFusion has fallen off the face of the earth in terms of web development. Perl has also gone the way of the dinosuar for web development, probably keeping some popularity with shell scripting though.
PHP has a massive community, not just here, but sitepoint, phpfreaks and just about any other forum which disscusses web development. An almost unlimited number of open source projects covering every problem area you can think of.
PHP just makes sense.
PHP has a massive community, not just here, but sitepoint, phpfreaks and just about any other forum which disscusses web development. An almost unlimited number of open source projects covering every problem area you can think of.
PHP just makes sense.
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: Why Use PHP
To me you might as well ask me why use toilet paper?prasanthi wrote:How would you compare working in PHP with working in ColdFusion?
*edit* I didn't really read the part about Cold Fusion...but Myspace comes to mind so I don't feel so bad for some reason now.
Re: Why Use PHP
Why use PHP:
It's open source (re: free!) and has a great community.
It's a constantly improving language with pretty good OO implementation.
It's relatively unobtrusive (re: opposite of ASP)
It's a proven scalable solution
It's C syntax style (if you like that sort of thing)
It was built for the web and has many web specific features
And simply cause I like it!
It's open source (re: free!) and has a great community.
It's a constantly improving language with pretty good OO implementation.
It's relatively unobtrusive (re: opposite of ASP)
It's a proven scalable solution
It's C syntax style (if you like that sort of thing)
It was built for the web and has many web specific features
And simply cause I like it!
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Why Use PHP
PHP, Java (such as JSP) and ASP.NET are all in wide use. Rails for Ruby and Django for Python are increasing in popularity and superior to the previous three in my opinion.I think the race has come down to PHP and ASP
If you're a deviant you might want to try Seaside for Smalltalk or YAWS for Erlang.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Why Use PHP
I choose PHP because of it's openess and it's syntax being similar to Perl and C/C++ -- those were major benefits for me as I had long since developed the habit of adding that semi-colon to represent end of statement. 
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Why Use PHP
I don't buy the "I love C syntax" thing.
C syntax was good for C.
One of the greatest things about Ruby is it's syntax.
I think you're underselling yourself if you think you can't get used to a new syntax. And having or not having to write a semi-colon at the end of every line is not any kind of indication of the quality of a language.
C syntax was good for C.
One of the greatest things about Ruby is it's syntax.
I think you're underselling yourself if you think you can't get used to a new syntax. And having or not having to write a semi-colon at the end of every line is not any kind of indication of the quality of a language.
Re: Why Use PHP
What's wrong with liking a particular syntax? you obviously like Ruby, so why can't it be PHP (C) syntax for others?
-
taramichael
- Forum Newbie
- Posts: 4
- Joined: Mon Jun 02, 2008 6:53 am
Re: Why Use PHP
Hi Prasanthi,
Why are you comparing?
Why are you comparing?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Why Use PHP
A lot of programmers, even good ones, get caught in a mind trap where they can only see one way of doing things. It's concerning when people dismiss things they haven't given a proper chance. What can I call that but closed-mindedness?pytrin wrote:What's wrong with liking a particular syntax? you obviously like Ruby, so why can't it be PHP (C) syntax for others?
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: Why Use PHP
Ruby is sexy. But so is JavaScript... But so is....
The bottom line: the language doesn't matter as much as you think it does. The more you know about other languages the better you'll be at all of them.
The bottom line: the language doesn't matter as much as you think it does. The more you know about other languages the better you'll be at all of them.
-
jack_indigo
- Forum Contributor
- Posts: 186
- Joined: Sun Jun 08, 2008 11:25 pm
Re: Why Use PHP
Step 1. Write stuff in PHP.
Step 2. Optimize DB.
Step 3. If DB won't speed up, web farm front-end for performance boost.
Step 4. If that won't help, switch MySQL to PostgreSQL because it scales better.
Step 5. Rewite the slow parts of the app even better.
Step 6. Rewite the slow parts of the app in C and load them into PHP.
That path is not too hard to do.
Why use PHP?
- Widespread adoption -- community is more vast than other communities.
- Nicer people? :drunk:
- Easier to get developers than, say, Ruby or Python.
- It just works.
- You can focus on the app logic, not fight with the language.
- Dynamic Typing (Duck Typing) over Static Typing.
- Huuuuuge set of add-ins either written in C (PECL) or PHP (Pear, sitescripts.com, etc.)
- Can still integrate components from your favorite language if you absolutely want that.
- Have libraries or there are scripts on the net that basically cover every angle for it.
- It's not owned/run by Sun or Microsoft or IBM and the community is more democratic.
Step 2. Optimize DB.
Step 3. If DB won't speed up, web farm front-end for performance boost.
Step 4. If that won't help, switch MySQL to PostgreSQL because it scales better.
Step 5. Rewite the slow parts of the app even better.
Step 6. Rewite the slow parts of the app in C and load them into PHP.
That path is not too hard to do.
Why use PHP?
- Widespread adoption -- community is more vast than other communities.
- Nicer people? :drunk:
- Easier to get developers than, say, Ruby or Python.
- It just works.
- You can focus on the app logic, not fight with the language.
- Dynamic Typing (Duck Typing) over Static Typing.
- Huuuuuge set of add-ins either written in C (PECL) or PHP (Pear, sitescripts.com, etc.)
- Can still integrate components from your favorite language if you absolutely want that.
- Have libraries or there are scripts on the net that basically cover every angle for it.
- It's not owned/run by Sun or Microsoft or IBM and the community is more democratic.
Re: Why Use PHP
My Points:
- The manual - PHP has the best one I've ever seen
- Popularity
- The manual - PHP has the best one I've ever seen
- Popularity
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Why Use PHP
If you are considering which language to *learn* (and I guess that's where the OP is coming from) you have to predict a bit. PHP has superb community right now but in a year's time you have to consider how that might change especially in relation to others.- Widespread adoption -- community is more vast than other communities.
- Easier to get developers than, say, Ruby or Python.
Nicer than what?- Nicer people?
Yep, it's true. PHP is certainly a lot simplier than ASP or Java and if you've played with C a bit before it'll definitely have the lowest barrier to entry - you'll already know some of the functions. This is helped further by how widely deployed PHP is on servers. That's how I got into it.- It just works.
Better than Java absolutely but there's definite fighting going on when you start to do stuff at a bigger scale such as the lack of mixins, writing endless setters and getters and very limited runtime extension of objects. Also I find the syntax pretty inefficient. Consider:- You can focus on the app logic, not fight with the language.
Code: Select all
echo strlen($this->string);Code: Select all
puts string.lengthWhich is an interesting point because the presences of type hinting, interfaces and in future typed return values would imply that PHP is very class oriented. Although there's definitely more freedom than Java, which is like a straight-jacket, I still think this could be improved.- Dynamic Typing (Duck Typing) over Static Typing.
I can't stand the PEAR system and most of the contributed code in it and the closed nature of it. I think those things have really held PHP back as a language. Also the lack of namespacing, decent dependency management and issues with file inclusion (potenially PHAR solves that, is anyone using that?) make libraries difficult to use and write.- Huuuuuge set of add-ins either written in C (PECL) or PHP (Pear, sitescripts.com, etc.)
What do you mean by this?- Can still integrate components from your favorite language if you absolutely want that.
Yep, and they are usually badly written. There are numerous published books on PHP choc full of security vulnerabilities.- Have libraries or there are scripts on the net that basically cover every angle for it.
Yeah this is undoubtedly a good thing but this is by no means unique to PHP.- It's not owned/run by Sun or Microsoft or IBM and the community is more democratic.
Oh yes! This is probably one of the single greatest things about PHP.- The manual - PHP has the best one I've ever seen