The PHP language at first evolved without a written
formal specification or standard, with the original
implementation acting as the
de facto standard that other implementations aimed to follow.
Early history (1993 to 1997) PHP development began in 1993 which he used to maintain his
personal homepage. He extended them to work with
HTML forms and to communicate with
databases, and called this implementation "Personal Home Page/Forms Interpreter" or PHP/FI. An example of the early PHP
syntax: Hey, you are using Netscape! Sorry, that record does not exist Welcome ! You have credits left in your account. PHP/FI could be used to build simple,
dynamic web applications. To accelerate
bug reporting and improve the code, Lerdorf initially announced the release of PHP/FI as "Personal Home Page Tools (PHP Tools) version 1.0" on the
Usenet discussion group
comp.infosystems.www.authoring.cgi on 8 June 1995. This release included basic functionality such as
Perl-like variables, form handling, and the ability to embed
HTML. By this point, the
syntax had changed to resemble that of
Perl, but was simpler, more limited, and less consistent. A development team began to form and, after months of work and
beta testing, officially released PHP/FI 2 in November 1997. The fact that PHP was not originally designed, but instead was developed organically has led to inconsistent naming of functions and inconsistent ordering of their parameters. In some cases, the function names were chosen to match the lower-level libraries which PHP was "wrapping", while in some very early versions of PHP the length of the function names was used internally as a
hash function, so names were chosen to improve the distribution of
hash values.
PHP 3 and 4 (1998 to 2004) content management system.
Zeev Suraski and
Andi Gutmans rewrote the
parser in 1997 and formed the base of PHP 3, changing the language's name to the
recursive acronym PHP: Hypertext Preprocessor. Afterwards, public testing of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then started a new
rewrite of PHP's core, producing the
Zend Engine in 1999. They also founded
Zend Technologies in
Ramat Gan, Israel.
Early PHP 5 (2004 to 2006) On 1 July 2004, PHP 5.0 was released, powered by the new Zend Engine 2.0. PHP 5.1 and PHP 5.2 were released the following years, adding smaller improvements and new features, such as the PHP Data Objects (PDO) extension (which defines a lightweight and consistent interface for accessing databases) In 2008, PHP 5.x became the only stable version under development. Many high-profile open-source projects ceased to support PHP 4 in new code from February 5, 2008, because of the GoPHP5 initiative, provided by a consortium of PHP developers promoting the transition from PHP 4 to PHP 5.
PHP 6 and Unicode PHP's native string functions worked only on raw bytes, making use with
multibyte character encodings difficult. In 2005, a project headed by Andrei Zmievski was initiated to bring native
Unicode support throughout PHP, by embedding the
International Components for Unicode (ICU) library, and representing text strings as
UTF-16 internally. Since this would cause major changes both to the internals of the language and to user code, it was planned to release this as version 6.0 of the language, along with other major features then in development. However, a shortage of developers who understood the necessary changes, and performance problems arising from conversion to and from UTF-16, which is rarely used in a web context, led to delays in the project. As a result, a PHP 5.3 release was created in 2009, and in March 2010, the project in its current form was officially abandoned, and a PHP 5.4 release was prepared to contain most remaining non-Unicode features from PHP 6. Initial hopes were that a new plan would be formed for Unicode integration, but by 2014 none had been adopted.
Later PHP 5 (2009 to 2014) Because it contained features originally intended to be part of 6.0, PHP 5.3 was a significant release, adding support for
namespaces,
closures,
late static binding, and many fixes and improvements to standard functions. With the Unicode branch officially abandoned, a new release process was adopted in 2011, planning a yearly release cycle, and a clear distinction between "feature releases" (x.y.z to x.y+1.z) and "major releases" (x.y.z to x+1.0.0). requiring Windows 32-bit compatibility mode while using
Internet Information Services (IIS) on a 64-bit Windows platform. PHP version 5.5 made the 64-bit
x86-64 builds available for Microsoft Windows. Official security support for PHP 5.6 ended on 31 December 2018.
PHP 7.x (2015 to 2019) During 2014 and 2015, a new major PHP version was developed, PHP 7.0. The numbering of this version involved some debate among internal developers. While the PHP 6 Unicode experiments had never been released, several articles and book titles referenced the PHP 6 names, which might have caused confusion if a new release were to reuse the name. After a vote, the name PHP 7 was chosen. The foundation of PHP 7.0 was a PHP
branch that was originally dubbed
PHP next generation (
phpng). It was written by Dmitry Stogov, Xinchen Hui and Nikita Popov, and aimed to optimize PHP performance by refactoring the Zend Engine while retaining near-complete language compatibility. By 14 July 2014,
WordPress-based benchmarks, which served as the main benchmark suite for the phpng project, showed an almost 100% increase in performance. Changes from phpng make it easier to improve performance in future versions, as more compact data structures and other changes are seen as better suited for a successful migration to a
just-in-time (JIT) compiler. Because of the significant changes, the reworked Zend Engine was called
Zend Engine 3, succeeding Zend Engine 2 used in PHP 5.x. PHP 7.0 also included changes which were not backward compatible, as allowed for "major versions" under the
versioning scheme agreed in 2011. a more predictable behavior of the
foreach statement, and platform consistency of
bitwise shifts Several unmaintained or deprecated
server application programming interfaces (SAPIs) and extensions were removed from the PHP core, most notably the legacy mysql extension. Other legacy features were also removed, such as ASP-style delimiters <% and %> and <script language="php"> ... </script>. PHP 7.0 marked the beginning of an expansion in PHP's type system. In PHP 5.x, only function parameters could have type declarations, but this was extended to function return types in 7.0., and object properties in 7.4 The types expressible also expanded, with
scalar types (integer, float, string, and boolean) in 7.0; type, nullable types, and
return type. all in 7.1; and the type in 7.2 Other changes in this period aimed to add expressiveness to the language, such as the (
null coalesce) and "spaceship"
three-way comparison operators in 7.0; new syntax for array derefencing and catching multiple exception types in PHP 7.1; more flexible
Heredoc and Nowdoc syntax in 7.3; and the null-coalescing assignment operator in 7.4.
PHP 8.x (2020 onwards) PHP 8.0 was released on 26 November 2020, as a major version with
breaking changes from previous versions. One of the most high-profile changes was the addition of a
JIT compiler, which can provide substantial performance improvements for some use cases. Substantial improvements were expected more for mathematical-type operations than for common web-development use cases. Additionally, the performance advantage of the JIT compiler provides the potential to move some code from C to PHP. A significant addition to the language in 8.0 is
attributes, which allow metadata to be added to program elements such as classes, methods, and parameters. in PHP 8.3, and the and attributes in PHP 8.5. A significant extension to the language's type system is the addition of composite types: union types in PHP 8.0 (e.g. meaning "either integer or string"), and referring to properties which have not been declared on the class.
Release history Beginning on 28 June 2011, the PHP Development Team implemented a timeline for the release of new versions of PHP. Under this system, at least one release should occur every month. Once per year, a minor release should occur which may include new features. Every minor release should at least be supported for two years with security and bug fixes, followed by at least one year of only security fixes, for a total of a three-year release process for every minor release. No new features, unless small and self-contained, are to be introduced into a minor release during the three-year release process. A 2024 RFC extended the length of the security fix only period to two years, fixed all end of life dates to 31 December, and removed the exception that allowed for "small and self-contained" features to be introduced in patch versions. Those included the 9.7% of PHP websites using the even more outdated (discontinued for 7 years) and insecure PHP 5, released over two decades ago. == Mascot ==