PHP runs very efficiently, even on small hardware footprints, is tightly integrated with the web server, and is better suited for agile development by amateurs.it is open source A large and extensive support for the regular expressions that are used heavily for matching patterns and substitutions. You can perform a variety of string related tasks like compression, manipulations, etc.
d. Support for the Raw HTTP headers that are frequently used in redirections, authentications and other high level site designs.
for further information on why php is better read this
http://whatwhy.in/technology/why-is-php-better-than-other-programming-languages/221/
n the reason why it is used for web applicatin development
PHP is a language that is specifically designed for web programming with built-in integration with the most popular open source database MySQL.
Easy to start with: As a beginner it is easy to start with PHP. The user just have to add a few PHP-tags with e.g. a for-loop in it's existing HTML-files and then upload it to the server and see the result or an error message. Dynamic typing and associative arrays makes it also easier to start using PHP.
Easy to use: Compared to most solutions like e.g. Java, PHP doesn't need to be compiled, so it's just to write the script and then upload it to the server and then update the browser.
Integrated database support: PHP has (mostly) built-in support for the most popular databases like e.g. MySQL, that means it is easy to start using databases, no additional drivers needs to be installed, just to use the mysql-functions. The easy to use web based admin tool PHPMyAdmin (released 1998) is also important to the PHP's success in combination with MySQL.
Old language (since 1995) with a big user base: PHP became popular early (1995) since it was designed for web programming. Since then the user base has grown and now there is many web-oriented frameworks and libraries available. Some examples are blogg-systems and e-shopping-platforms.
Cheap hosting: Since PHP has existed for long time and works good on both Linux and Windows, and many webservers have support for it. There is no problem to find hosting with PHP pre-installed.