Article
Which Server-Side Language Is Right For You?
PHP
A relative newcomer in the server-side development arena, PHP has gained a large following among programmers with its familiar syntax and comprehensive function library. Also, its relatively simple syntax and low, low price (it's free!) has made it an attractive alternative to Microsoft's ASP for new developers.
PHP has been dubbed by some to be 'Perl killer' of the server-side scripting world. For purposes of Web development, PHP can do almost everything that Perl can, and usually does it quicker and easier. Unlike Perl, which usually runs as a CGI program invoked by the Web server to handle each page request, PHP can integrate with your Web server so that it operates much more efficiently.
PHP is an extremely capable language, with a vast array of built-in functions to do everything from tracking user sessions to generating dynamic graphics and even PDF files on the fly! No modules to install, no commercial add-ins to buy... PHP handles everything itself! In fact, just about the only weakness of PHP is that it's relatively difficult to expand the language to add non-standard functionality that is not handled by its built-in functions. Doing this requires a knowledge of C/C++ programming and is not for the faint of heart! Fortunately, you'd have to come up with a very esoteric Web application to require functionality that isn't already built into PHP.
PHP is free, cross-platform, Open Source software. It integrates with all major Web servers on all major operating systems. This is a great boon for developers on a budget, because they can set up a complete Linux-based Web server with PHP support and not pay a dime for software! The downside of this, of course, is that there is no formal support for any problems you may encounter with PHP. Also since PHP is such a new and actively developed technology, there are still occasional bugs found in the latest versions. Don't let these niggles put you off, though -- PHP has an extremely active user community (a large segment of which can be found in our very own SitePoint Forums!) that is always eager to help you with any stumbling blocks, and the current versions of PHP are quite stable and reliable.
Advantages:
- Fairly easy to learn, especially for developers with C/C++, Java, or Perl experience.
- Active user community willing to lend you a hand getting started.
- Everything's built right into the language.
- It's free!
- Cross-platform.
Drawbacks:
- This language was designed to be programmer-friendly, which unfortunately makes it a little less friendly to non-programmers.
Target Developer:
Web developers on a budget who enjoy simple programming (e.g. JavaScript), or don't mind learning how. PHP gives you a great deal of power with relatively simple code structure, but may not be suited to very high end applications that aren't supported by PHP's built-in features.