If you want to use PHP in your company and your manager favours another solution, or if you are trying to convince a potential client that PHP really is a superior choice for the web, you're going to need to have a clear-cut set of reasons why you believe PHP is the superior language. This short list should help you get started:
PHP is cross-platform. It can be run on Windows, Linux, BSD, Mac OS X, and Solaris, as well as a variety of other platforms.
PHP is free. You can download the source code, use it, and even make changes to it without ever having to pay any licensing costs. You can even give away your own modified version of PHP. Note to critics: just because PHP is free, it doesn't mean you need to give your scripts away for free.
PHP is fast. In the majority of scripts beyond basic benchmarks, PHP will easily compete with both Perl and Python, and usually match Microsoft's ASP.NET. Add to that the fact that PHP code can be cached for execution, and PHP's performance is first-class.
PHP is capable. There are thousands of pre-written functions to perform a wide variety of helpful tasks - handling databases of all sorts (MySQL, Oracle, MS SQL, PostgreSQL, and many others), file uploads, FTP, email, graphical interfaces, generating Flash movies, and more.
PHP is extendable. Writing your own extension to PHP is a common and easy way to implement speed-critical functionality, and PHP's extension API is a particularly rich and flexible system.
PHP is reliable. It already runs on millions of servers around the world, which means it is mature enough for even the most demanding of situations.
PHP is easy to debug. There are a number of debuggers, both commercial and freeware, that make debugging PHP a snap.
PHP is supported commercially. Two of the main contributors to PHP founded a company, Zend, to sell supporting products and technical support for the language, so there is no need to worry about PHP not being supported by a big company.
PHP is supported by the community. There are several very popular PHP web-sites such as www.phpbuilder.com that provide user-run technical support for PHP, as well as a variety of official mailing lists to help you get answers when you need them.
PHP is advancing. With the release of PHP 5, PHP has introduced features that have long been waited for, including more comprehensive error handling, better object orientation, and, of course, more speed.
PHP is fun! As I am sure you will agree while using this book, PHP is an enjoyable language to use - very little time is spent debugging code, and there is a large selection of pre-written functions available. OK, so your boss might not care too much about this one...
If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!
Next chapter: Extending PHP >>
Previous chapter: When not to use PHP
Home: Table of Contents
Copyright ©2015 Paul Hudson. Follow me: @twostraws.