Daytime
in
Tucson
Flower
of the
Month
Phase
of the
Moon
PHP is most commonly used as a server-side scripting language for creating dynamically generated websites.
PHP Runs on the Server
PHP runs on a web host's server rather than on your computer, unlike JavaScript, which actually is an extension of your browser and runs on your local machine. One of the main advantages of server-based scripting is that the web developer doesn't have to be concerned about differences between users' operating systems and browsers. The developer only has the behavior of a single machine to worry about: the server. Another important advantage is that server-side scripting allows secure access to databases located within the web host's environment.
PHP Is a Scripting Language
A scripting language is a type of programming language that is usually interpreted line by line at runtime rather than compiled ahead of time. Interpreting and compilation are both operations that convert human-readable code into machine-readable code. Scripting languages are also languages which are used in association with other applications rather than running as stand-alone programs. PHP usually interfaces with the Apache web server software on Linux machines, although Windows versions are also available.
PHP for Dynamically Created Pages
"Dynamically created" means a web page can be generated on the fly by the server according to the situation at the moment. For example, if a web visitor has added items to an online shopping cart, a page can be created just for him, on demand, showing him the specific contents of his cart along with the total price.
Before the advent of PHP, the most common server-side language was Perl. Perl was sort of, in its own way, fun. The syntax was, uh, let's say, creative. Innovative. Unusual. Well, OK, odd with a touch of spookiness. I liked it, anyway. But Perl was not originally created to be a web language. Rather, it was twisted and smooshed and tormented into taking the form of a web language. PHP, however, was written expressly for the web. It is a clean, brilliantly clear, versatile, C-like language. There are a multitude of uses for PHP, including: