PHP

PHP (Recursive initialism for PHP: Hypertext Preprocessor) is a general purpose scripting language mainly used for back end programming for web servers, although it could be executed by the browser as well. It could process, receive and send HTTP requests. PHP has it's own interpreter and compiler.
A website theoretically could be 100% made by pure PHP syntax, although some static assets is needed for the PHP to fetch and get.
It is implemented on approximately 79.2% of all current web servers known popularly on the Internet.
== Software ==
=== History ===
PHP is written in the C programming language, although in it's early days, it is only created to serve blogs and news updates, it is now capable of multi purpose functions. The creator of PHP is Rasmus Lerdorf, and now maintained by the PHP team.
=== Syntax ===
Although PHP has a flexible and weak syntax, since version 7.0, it uses a gradual typing technique to type it's code.
The following is an example syntax of early PHP:
<!--include /text/header.html-->
<!--getenv HTTP_USER_AGENT-->
<!--if substr $exec_result Mozilla-->
 Hey, you are using Netscape!
<!--endif-->
<!--sql database select * from table where user='$username'-->
<!--ifless $numentries 1-->
 Sorry, that record does not exist
<!--endif exit-->
 Welcome <!--$user-->!
 You have <!--$index:0--> credits left in your account.
<!--include /text/footer.html-->
* <!--include /text/header.html-->. The include syntax is used to fetch a file, in this case, in the root directory named /text/header.html.
* <!--getenv HTTP_USER_AGENT-->. The getenv syntax is used to recognize the environment the user is browsing in, or the server's environment, in this case, to get the user browsing agent of the user.
* <!--if substr $exec_result Mozilla-->. The if operator detects if the user agent is Mozilla, or not. If yes, continue to next line, if not, skip if section.
* <!--endif-->. End if statement.
* <!--sql database select * from table where user='$username'-->. Select the current assigned variable from SQL database and check if the variable have a data cell in the username field.
* <!--ifless $numentries 1-->. Skip if statement if numentries is 1.
* <!--endif exit-->. Exit preprocessor, go to content.
* Welcome <!--$user-->! You have <!--$index:0--> credits left in your account.. Assign variables to $user and $index.
The explanation above is guessed due to the lack of PHP manuals for older syntaxes, please refer to the current PHP documentation and manual for updated view.
== References ==
Category:Programming languages