Professional Software Consulting
PHP: Server Side Programming

PHP stands for PHP: Hypertext Preprocessor. It is called a recursive acronym, because the acronym is contained within the acronym itself. Kind of silly, but the real question is, what is it used for and why would you use it?

PHP is a server side programming language - meaning that it will never run in your browser. That doesn't mean that it has nothing to do with a web page, however. Like all server side languages, its job is to process a file on behalf of the web server so that the server can send to the browser only what it can handle; generally HTML, style sheets, and javascript. Several other server side technologies like ASP, JSP, and Perl (to name but a few) do the same thing.

There are several reasons to use server side languages like PHP. They can access databases on the website, so all data for an application is stored in one place. They enable algorithms to be hidden: anything sent to the browser can be read by a savvy user, but algorithms written in PHP are never sent to the browser - only their output. They also ease maintenance: update the PHP code on your website, and all your users instantly get the new functionality; there is nothing to distribute or browser caches to clear.

As a programmer, there are several advantages to PHP as a general purpose language:

  • Excellent Documentation. The documentation is well organized by category, reminiscent of Unix man pages but in an HTML format that makes it convenient to navigate from entry to entry. In addition, each page has a place where the PHP community posts comments, work-arounds, and enhancements to the basic functionality.

  • Applicability. In addition to being useful as a server-side web programming language, PHP can also be used as a command line scripting language. While it doesn't support an interactive command shell like the various Unix shell scripting languages and Windows CMD shell, this facility allows back-end scripts access to practically anything a web application can do - and vice-versa.

  • Widely Supported. There are user groups as well as experts who have "done it before" that you can ask, using IRC channels or mailing lists, not to mention support groups and conferences. There are also thousands of blog postings about PHP that are a tremendous resource.

  • Versatility. PHP can be written in an object-oriented manner, or in a sequential manner like old-style C code. Placing code in separate files, a body of code can be architected similar to shell scripts where scripts run other scripts and check return values, or included like C header files.

  • Loosely Typed Variables. While some might argue that this leads to sloppy code, I find it eases development tremendously. Having the ability to print what a variable is, whether it's a simple integer or a seven dimensional array of objects, is a incredibly useful when debugging code.

There are other reasons why PHP is a good choice, but these are the ones I consider most important.


     Contact Us     

Something wrong with this page or this site? Let the webmaster know by clicking HERE
This website designed, implemented, and maintained by Corey Dulecki
© 2009-2012, Corey's Consulting LLC