PHP: Hypertext Preprocessor
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. As of January 2013, PHP was installed on more than 240 million websites (39% of those sampled) and 2.1 million web servers.
Originally created by Rasmus Lerdorf in 1994, the reference implementation of PHP is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, a recursive backronym.
PHP code can be simply mixed with HTML code, or it can be used in combination with various templating engines and web frameworks. PHP code is usually processed by a PHP interpreter, which is usually implemented as a web server’s native module or a Common Gateway Interface (CGI) executable. After the PHP code is interpreted and executed, the web server sends resulting output to its client, usually in form of a part of the generated web page – for example, PHP code can generate a web page’s HTML code, an image, or some other data. PHP has also evolved to include a command-line interface (CLI) capability and can be used in standalone graphical applications.
PHP is free software released under the PHP License. PHP has been widely ported and can be deployed on most web servers on almost every operating system and platform, free of charge.
Release History
- 1.0 – 8 June 1995 – Officially called “Personal Home Page Tools (PHP Tools)”. This is the first use of the name “PHP”.
- 2.0 – 1 November 1997
- 3.0 – 6 June 1998 – Development moves from one person to multiple developers. Zeev Suraski and Andi Gutmans rewrite the base for this version.
- 4.0 – 22 May 2000 – Added more advanced two-stage parse/execute tag-parsing system called the Zend engine.
- 4.1 – 10 December 2001 – Introduced ‘superglobals’ ($_GET, $_POST, $_SESSION, etc.)
- 4.2 – 22 April 2002 – Disabled register_globals by default. Data received over the network is not inserted directly into the global namespace anymore, closing possible security holes in applications.
- 4.3 – 27 December 2002 – Introduced the command-line interface (CLI), to supplement the CGI.
- 4.4 – 11 July 2005 – Fixed a memory corruption bug, which required breaking binary compatibility with extensions compiled against PHP version 4.3.x.
- 5.0 – 13 July 2004 – Zend Engine II with a new object model.
- 5.1 – 24 November 2005 – Performance improvements with introduction of compiler variables in re-engineered PHP Engine. Added PHP Data Objects (PDO) as a consistent interface for accessing databases.
- 5.2 – _2 November 2006_- Enabled the filter extension by default. Native JSON support.
- 5.3 – 30 June 2009 – Namespace support; late static bindings, Jump label (limited goto), Native closures, Native PHP archives (phar), garbage collection for circular references, improved Windows support, sqlite3, mysqlnd as a replacement for libmysql as underlying library for the extensions that work with MySQL, fileinfo as a replacement for mime_magic for better MIME support, the Internationalization extension, and deprecation of ereg extension.
- 5.4 – 1 March 2012 – Trait support, short array syntax support. Removed items: register_globals, safe_mode, allow_call_time_pass_reference, session_register(), session_unregister() and session_is_registered(). Built-in web server. Several improvements to existing features, performance and reduced memory requirements.
- 5.5 – 20 June 2013 – Support for generators, finally blocks for exceptions handling, OpCache (based on Zend Optimizer+) bundled in official distribution.
- 5.6 – 28 August 2014 – Constant scalar expressions, variadic functions, argument unpacking, new exponentiation operator, extensions of the use statement for functions and constants, new phpdbg debugger as a SAPI module, and other smaller improvements.
- 7.0 – 12 Nov 2015 – Zend Engine 3 (performance improvements and 64-bit integer support on Windows), uniform variable syntax, AST-based compilation process, added Closure::call(), bitwise shift consistency across platforms, (null coalesce) operator, Unicode codepoint escape syntax, return type declarations, scalar type (integer, float, string and boolean) declarations, <=> “spaceship” three-way comparison operator, generator de legation, anonymous classes, simpler and more consistently available CSPRNG API, replacement of many remaining internal PHP “errors” with the more modern exceptions, and shorthand syntax for importing multiple items from a namespace.
Syntax
Each PHP statement is terminated by semicolon (”;”). The PHP markup can display text by using “echo” with variables named by dollar-prefix “$” on case-sensitive names ($xx, $xX, $NewX, etc.). The assignment operator is “=”. The markup can be modularized into functions (or methods) defined with keyword “function” within optional classes named by “class xx”. The control structures include: if, while, for, foreach, & switch. Grouping of text can be specified by curly braces (”{…}”), but some control structures can use colon syntax with end keywords, such as in statement if ($x==0) : echo “zero”; endif;
The following Hello world program is written in PHP code embedded in an HTML document:
<!DOCTYPE html>
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
We are in the process of heavy site maintenance, the cross references are unavailable at the moment, sorry.