I thought I would put together a list of why people should use PHP vs all the other options out there.
1. Scalability – PHP is so simple to scale! In the event your project goes viral, you can bet PHP will be there to make sure its done. Since it has the share nothing architecture, you can for the most part drop another server in a cluster and go. With very little configuration.
2. Programming – PHP is simple to program with. There are more PHP programmers then other languages. So when your company needs a new programmer, it won’t take weeks to find him or her. If you hit odesk or people per hour, you could have a programmer in 10 minutes. Not many languages can say that. Most PHP applications you can hand any PHP programmer and he or she will get it. If its complicated, ether your code is wrong or method of doing the job is too complicated to begin with.
3. Made for the Web – PHP was designed for the net. Its life is on the net. Its not like other languages that try to do everything and anything. That is when things get bloated.
4. Frameworks – Tons of frameworks for PHP. I can’t even name them all off the top of my head. Some people love frameworks. My personal opinion is that frameworks are for people who need to get up and running fast or are too lazy to write the code from scratch. Every app I have built is fresh from the ground up. Sure it take more time, but I know every line of code to that app. I have less overhead since it is just my code and not the framework included. Frameworks have their place but that place generally isn’t with me.
5. Failure rate – As long as your app follows the 5 > PHP version method of programming you should have code that doesn’t fail. If it does its probably the programmer, 9 times out of 10. PHP starts requests every time fresh, one request will not corrupt another. Other languages need some work to handle something like this.
6. Loving Google – PHP is so well documented. It’s not even funny. You can search any function in google (i.e. date php) and you will get the function along with examples and very good explanation. I would say the SOAP server side of PHP needs some more work and documentation but that is the only area of PHP that I have come to dislike. And of course the tried and true method, if you can’t figure it out, just Google it! 🙂 When I have run into an issue I didn’t create, I Google it and bam! I got the answer! I recently had a chance to work on another app with a language I was less familiar with and documentation along with general posts on the net just didn’t exist. If you want to learn PHP, just come up with an idea to build and hit the php.net documentation. It will be slow going but you will figure it out. Not many languages can say that ether.
7. Community – Kind of going back to 6. but there is huge following behind PHP of full time and hobbyist of programmers with questions and solutions. One thing that separates the PHP and the ASP.net group of developers is the willingness to help. If you have some code that doesn’t work, post the PHP code on any one of the major forums and most if not all the responses will have the answer and the completed code for you! ASP.net not so much. I have seen a ton of occasions where the answer was given but it was vague. And for funny, see the response times. On PHP forums you will see responses in minutes. Other languages its hours, or even days, and some times no response. I have never posted something about PHP and didn’t get a response. Now this is personal opinion with the forum stuff but from my experience this is the case for me.
8. Sharing – PHP code is shared more then any code I believe. Anything you can dream of has been built and a lot of the times its just given away. Open source rocks and PHP is another great case point.
9. Mac friendly – Remember the days when stuff didn’t work with Mac or it didn’t work with Windows. I mean that still happens a little bit today but 10 or so years ago, this was the norm. My first computer was a Mac Preforma, No clue as to what the model was but it was a all in one unit.Well buying software or accessories was a pain in the, well you get the idea. There are languages out there that are like the Mac of years ago. PHP is NOT like the Mac. PHP pretty much hooks into everything. Native stuff like MongoDB, MySqlDB, Memcache. PHP powers 30% of the internet. You know that one site, called facebook. Yeah, they used PHP. Banks, governments, you name it use PHP. PHP is not a fly by night language. It has plugins to just about everything. Generally your normally apps will be PHP, Linux, MySql. That’s about 90% of all PHP installs.
10. Greatest thing ever: Dynamic Typing – You do not have to declare the type of var. Oh my gosh, this is the greatest thing in the world. Other programmers call it lazy, I call it the right way of programming. A life time programmer taught me you should not code to code you should code to stop. In other words, you don’t over develop the application, simpler the better, and above all program itself should not be complicated. If I had to declare the type of var I was working with on every var I worked with every day I would have gone crazy. Not to mention the lost in time, it would add up.
11. Cost of ownership – The overall cost of PHP is less then any language. Initially and overall. The over abundance of PHP programmers brings cost down. The initial investment in hosting is always cheaper with PHP vs other languages since most installs are Linux based and they do not have to pay the licensing cost of the O/S installs. PHP solves issues quicker, easier then the next language.
12. If it hasn’t been built, its getting built. – Ease of learning PHP and the abundance of PHP developers mean applications are being developed faster, quicker, and more often then the next language. See Hotscripts.com and compare the amount of scripts for PHP vs other languages. Its huge. WordPress the application I use to control this site, is PHP based. Go to the extend part of wordpress.org and see it grow by checking in every day!
There you go, thats my simple list. Some fact, some opinion. I admit I’m a PHP programmer but I have converted ASP.net, Coldfusion, even Ruby on rails guys and gals to PHP after chatting for only a few minutes. I generally say, how would you go about this and have a random example. Tell them to write the code and before they are done I have it done on my laptop. That says a lot I think.