Advantages of php

Compared to other languages and especially compared to web frameworks, PHP is lower level, less abstract, and more transparent. There is little 'magic' that's running behind the scenes that makes your code work. This can be an advantage when you want to understand in detail what is going on on in your code. When programming in a more complicated framework, you may have to wade through a morass of classes, subclasses, mixins, and 'clever' abstractions to figure out what is actually happening behind the scenes. PHP is much simpler, and if a program is well written (a big if), it's often easier to deduce exactly what it does and how it does it.

Easy for beginners to pick up
Can be hosted nearly everywhere.
By default there is a 1-1 correspondence between URLs and files, making it easy for designers, programmers, and other team members to edit and create pages. This is especially useful on large, mostly static content sites where there are hundreds and thousands of content pages, many one-offs and different templates, and routing everything through a router, controllers and views would be overengineering.
Scaling PHP is relatively common knowledge.
Easy to deploy: just copy the files (or if you are more sophisticated, rsync the files, svn up the files, or git pull the files)
Has frameworks with a relatively easy learning curve
Documentation is excellent
Easy to oursource development - there are many coders around the world willing to code PHP inexpensively
If you are creating software that needs to be deployed to a wide variety of hosting environments (such as Wordpress or forums) PHP is the lingua franca of web hosting companies and will work nearly everywhere.
PHP has a selection of decent CMS's such as Drupal, Expression Engine and Wordpress
PHP runs in separate isolated processes within Apache so it is very difficult for any one process to bring down the entire web server. If anything goes wrong, there is minimal effect because PHP's state is completely reset at the beginning of each request. This ends up being more reliable than systems that use long-lived processes that handle many requests.


Bicycles Locks India
 
Despite my long post here: What are the horrors of PHP? PHP does have its advantages:

Compared to other languages and especially compared to web frameworks, PHP is lower level, less abstract, and more transparent. There is little 'magic' that's running behind the scenes that makes your code work. This can be an advantage when you want to understand in detail what is going on on in your code. When programming in a more complicated framework, you may have to wade through a morass of classes, subclasses, mixins, and 'clever' abstractions to figure out what is actually happening behind the scenes. PHP is much simpler, and if a program is well written (a big if), it's often easier to deduce exactly what it does and how it does it.
Easy for beginners to pick up
Can be hosted nearly everywhere.
By default there is a 1-1 correspondence between URLs and files, making it easy for designers, programmers, and other team members to edit and create pages. This is especially useful on large, mostly static content sites where there are hundreds and thousands of content pages, many one-offs and different templates, and routing everything through a router, controllers and views would be overengineering.
Scaling PHP is relatively common knowledge.
Easy to deploy: just copy the files (or if you are more sophisticated, rsync the files, svn up the files, or git pull the files)
 
Back
Top