PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Development Team. PHP originally stood for Personal Home Page, but it now stands for the Recursive Acronym PHP: Hypertext Preprocessor.
PHP code may be embedded into HTML or HTML5 markup, or it can be used in combination with various web template systems, web content management systems and web frameworks. PHP code is usually processed by a PHP interpreter implemented as a module in the web server or as a Common Gateway Interface (CGI) executable. The web server software combines the results of the interpreted and executed PHP code, which may be any type of data, including images, with the generated web page. PHP code may also be executed with a command-line interface (CLI) and can be used to implement standalone graphical applications.
That's how Wikipedia explains it.
In simple terms, PHP is the backbone of many websites, including the one you are reading right now. Some other interesting facts:
- A server-side language like PHP means you never see the code running publicly, because it's supposed to run in the background. If you do see the code on the clinet side 9what people look at), then something went wrong.
- PHP, as mentioned above, can be inserted into webpages, so if you happen to be reading the source code of a webpage (right click and look for "View Page Source"), you can see where PHP is called and referenced.
- PHP is a bit slow by itself, especially on large websites, so it generally needs other software to run alongside it to make sure web pages don't run slowly.
- PHP is not very secure if written poorly, and it's highly recommended any website owner with half a brain makes sure raw PHP code cannot run unprotected on web pages.