The PHP programming language is a server-side HTML embedded scripting language.
Let‘s depict the sentence. The PHP language runs on the server-side. This means that the execution (read starting) of the scripts are done on the server where the web-site is hosted. HTML embedded means that you can use PHP statements (read a piece of PHP code) from within an HTML code. PHP files are returned to the browser as plain HTML.
The last piece of the sentence – scripting language – is a little harder to explain, but we will give it a go. A scripting language is a form of programming language that is usually interpreted rather than compiled. In programming languages such C or C++ you compile the program (permanently) into an executable file, before you can execute the program. A program that is written in a scripting language, is interpreted one command at a time by a command interpreter (Command interpreter is in most cases an executable written in another language (for instance C/C++) than the scripting language.) Some other examples of scripting languages are Perl, Phyton, Java and Ruby.
What is PHP?
- PHP stands for PHP: Hypertext Preprocessor.
- As we said before it is a server-side scripting language.
- PHP is free and is an open source software product.
- The PHP scripts are executed on the server.
- PHP supports many databases (MySQL, Sybase, Oracle and many others.)
- PHP runs on different platforms (Unix, Linux, Windows.)
- PHP is compatible with almost all web-servers used today (Apache, IIS, etc.)
- A PHP file can contain plain text, HTML tags and scripts.
- The PHP files can have one of the following extensions: php, php3 or phtml.
There are many reasons to use PHP for server side programming, firstly it is a free language with no licensing fees so the cost of using it is minimal.
A good benefit of using PHP is that it can interact with many different database languages including MySQL.Both PHP and MySQL are compatible with an Apache server which is also free to license. PHP can also run on Windows, Linux and Unix servers.
Due to all these languages being free it is cheap and easy to setup and create a website using PHP.
PHP also has very good online documentation with a good framework of functions in place. This makes the language relatively easy to learn and very well supported online.