Here’s one for all the Ruby on Rails, Perl, Python (+Django) and ASP/.net web developers. There are a lot of myths about PHP, often developing from the language’s early beginnings, or simply by misconceptions perpetuated by areas of the enormous user base.
Sure, it isn’t perfect. It has its problems; from professionalism to consistency and even versioning. Still, it’s a fantastic language for web development; it’s efficient, scalable and, when used appropriately, effective. Read on for five reasons you should be using PHP for web development.
If there’s one thing you can’t fault PHP for, it’s deployment. mod_php just works – heck, PHP was even designed for mod_php. Setting up a PHP-enabled Apache web server can be a matter of just a single command at console, and LigHTTPD / IIS aren’t too hard either. A well written PHP script can simply be dropped into place, and it will work.
Today’s web applications involve some very complex routines. Web developers come across everything from XML parsing to string manipulation and even fetching pages from external web applications. PHP has an unbelievable amount of functionality built into the core. If you know what you want to achieve, a quick search of the PHP manual should reveal countless functions available to help you, and for everything else, there’s always phpclasses.
Thanks to the effectiveness of PHP deployments, shared hosting with Apache and PHP is now available for less than the price of a cup of coffee. If you want to head up a notch, VPS preconfigured perfectly for a PHP setup isn’t too dear, and there’s always native PHP support at the end of the line. If you want to develop with PHP and get your web apps out there, the infrastructure is ready for you.
All that functionality I mentioned before? It’s written in C. Not PHP, C. Unlike Python libraries in Python apps, Perl libraries in Perl scripts and so on, just about all of PHP’s core functionality is written in C, and is blazing fast as a result. Given enough memory, a PHP web application running on even an old PIII server can handle hundreds of thousands of hits per day. In comparison, a Ruby on Rails web application would need either top of the line hardware or multiple servers and load balancers, in order to handle a similar load.
With the scale of the PHP user base, comes a world of supplementary resources, tools and community built around the language. On offer are online tutorials, help through IRC channels and forums, code snippets, books and even live training sessions; in addition to this, more IDEs than you can shake a stick at, as well as all sorts of supplementary utilities. When it comes to extending your PHP, it’s all out there.