PHP stands for “Hypertext Preprocessor”, and is a widely used open source general-purpose scripting language. In other words, this is a programming language specifically designed for writing web applications (scripts) that run on a web server.
The syntax of the language originates from C, Java and Perl, and is pretty easy to learn. The advantage of PHP is that it provides web developers with the ability to quickly create dynamically generated web pages, and also its code can be embedded directly in HTML.
The main difference between PHP and JavaScript is that PHP scripts run on the server and generate HTML that is sent to the client. For instance, if you had a script like the one above placed on your server, the client would only get the result of its execution, but would not be able to figure out which code produced it. You can even configure your server so that regular HTML files are processed by the PHP processor, so clients won’t even be able to know if they are receiving a regular HTML file or the result of a script.
The main areas of using the PHP include:
- Creation of scripts for execution on the server side.
- Creation of scripts for execution on the command line.
- Creation of client-side windowed applications.