Content deleted Content added
Upgrade Version |
Citation bot (talk | contribs) Add: date, authors 1-1. | Use this bot. Report bugs. | Suggested by Abductive | Category:Articles containing potentially dated statements from January 2013 | #UCB_Category 53/127 |
||
Line 1:
{{Short description|Scripting language created in 1994}}
{{About|the scripting language}}
{{Infobox programming language
| logo = PHP-logo.svg
| logo size =
| file ext = {{codes|.php|.phar|.phtml|.pht|.phps|d=,}}
| paradigm = [[Multi-paradigm programming language|Multi-paradigm]]: [[imperative programming|imperative]], [[functional programming|functional]], [[object-oriented programming|object-oriented]], [[procedural programming|procedural]], [[reflective programming|reflective]]
| released = {{start date and age|1995|06|08|df=y}}<ref name="Lerdorf-1995" /><ref name="Lerdorf-2007">{{cite web | last=Lerdorf | first=Rasmus | title=PHP on Hormones – history of PHP presentation by Rasmus Lerdorf given at the MySQL Conference in Santa Clara, California | date=26 April 2017| publisher=The Conversations Network | url=http://itc.conversationsnetwork.org/shows/detail3298.html | archive-date=29 July 2013| archive-url=https://web.archive.org/web/20130729204354/http://itc.conversationsnetwork.org/shows/detail3298.html | url-status=dead | access-date=22 June 2009 }}</ref>
| designer = [[Rasmus Lerdorf]]
| developer = {{URL|https://php.net/credits/|The PHP Development Team}}, [[Zend Technologies]], {{URL|https://thephp.foundation/|PHP Foundation}}
| latest release version = {{wikidata|property|edit|reference|P548=Q2804309|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|single|P548=Q2804309|P348|P577}}}}
|
| implementations = [[Zend Engine]], [[HHVM]], [[PeachPie]], [[Quercus (software)|Quercus]], [[Parrot virtual machine|Parrot]]
| dialects =
| influenced by = [[Perl]], [[C (programming language)|C]], [[C++]], [[Java (programming language)|Java]],<ref>{{cite web | url = https://www.php.net/manual/en/preface.php | title = PHP: Preface – Manual}}</ref> [[Tcl]],<ref name="
| influenced = [[Hack (programming language)|Hack]], [[Jakarta Server Pages|JSP]], [[Active Server Pages|ASP]], [[React (JavaScript library)|React JS]]
| programming language = [[C (programming language)|C]] (primarily; some components in [[C++]])
| operating system = [[Unix-like]], [[Windows]], [[macOS]], [[IBM i]], [[OpenVMS]], [[IBM Z]]
| license = [[PHP License]]
| website = {{
| wikibooks = PHP Programming
}}'''PHP''' is a [[general-purpose programming language|general-purpose]] [[scripting language]] geared towards [[web development]].<ref>{{Cite web|url=https://www.php.net/|title=PHP: Hypertext Preprocessor|website=|access-date=12 February 2020}}</ref> It was originally created by [[Danish Canadians|Danish-Canadian]] [[programmer]] [[Rasmus Lerdorf]] in 1993 and released in 1995.<ref name="Krill-2013">{{Cite web |last=Krill |first=Paul |date=18 November 2013 |title=Believe the hype: PHP founder backs Facebook's HipHop technology |url=https://www.infoworld.com/article/2609877/believe-the-hype--php-founder-backs-facebook-s-hiphop-technology.html |access-date=13 October 2022 |website=InfoWorld |language=en}}</ref><ref>{{Cite web |title=Announce: Personal Home Page Tools (PHP Tools) |url=https://groups.google.com/g/comp.infosystems.www.authoring.cgi/c/PyJ25gZ6z7A/m/M9FkTUVDfcwJ?pli=1 |access-date=3 November 2022 |website=}}</ref> The PHP [[reference implementation]] is now produced by the PHP Group.<ref name="The PHP Group">{{cite web|access-date=25 February 2008|url=https://www.php.net/history|title=History of PHP and related projects |publisher=The PHP Group}}</ref> PHP was originally an abbreviation of '''''Personal Home Page''''',<ref name="php.net-3">{{cite web |title=History of PHP |url=https://php.net/manual/en/history.php.php |website=php.net}}</ref><ref>{{Cite book |last=Olsson |first=Mikael |url=https://books.google.com/books?id=_ahBAAAAQBAJ |title=PHP Quick Scripting Reference |date=4 September 2013 |publisher=Apress |isbn=978-1-4302-6284-8 |language=en}}</ref> but it now stands for the [[recursive acronym|recursive]] [[backronym]] '''''PHP: Hypertext Preprocessor'''''.<ref>[https://php.net/manual/en/preface.php PHP Manual: Preface], PHP.</ref>
PHP code
The standard PHP interpreter, powered by the [[Zend Engine]], is [[free software]] released under the [[PHP License]]. PHP has been widely ported and can be deployed on most web servers on
The PHP language has evolved without a written [[formal specification]] or standard<!-- until 2014 -->, with the original [[implementation]] acting as the ''[[de facto]]'' standard
W3Techs reports that {{as of|2024|10|27|lc=y}} (about two years since <!-- 28 November 2022 --> PHP 7 was discontinued and 11 months after the PHP 8.3 release), PHP 7 is still used by 50.0% of PHP websites, which is outdated and known to be insecure.<ref name="www.php.net">{{Cite web|url=https://www.php.net/eol.php|title=PHP: Unsupported Branches|website=}}</ref><ref name="W3Techs – World Wide Web Technology Surveys" /> In addition, 13.2% of PHP websites use the even more outdated (discontinued for 5+ years) and insecure PHP 5, and the no longer supported PHP 8.0 is also very popular, so the majority of PHP websites do not use supported versions.
== History ==
{{multiple image
| align =
| width = 105
| image1 = Rasmus Lerdorf cropped.jpg
| image2 = Andi Gutmans 1.jpg
| image3 = Zeev Suraski 2005 cropped.jpg
| footer = [[Rasmus Lerdorf]],
}}
=== Early history ===
PHP development began in 1993<ref name="Krill-2013" /> when [[Rasmus Lerdorf]] wrote several [[Common Gateway Interface]] (CGI) programs in [[C-programming|C]],<ref name="Lerdorf-2012">{{cite web | url = https://twitter.com/rasmus/status/226405807305138176 | title = I wonder why people keep writing that PHP was ever written in Perl. It never was. #php | last = Lerdorf | first = Rasmus | publisher = Twitter | date = 2012-07-20 | access-date = 2014-09-04}}</ref><ref>{{cite web | url = http://itc.conversationsnetwork.org/shows/detail3298.html | title = PHP on Hormones | format = mp3 | last = Lerdorf | first = Rasmus | publisher = The Conversations Network | date = 2007-04-26 | access-date = 2009-06-22 | archive-date = 2019-01-06 | archive-url = https://web.archive.org/web/20190106230504/http://web.archive.org/web/20130729204354id_/http://itc.conversationsnetwork.org/shows/detail3298.html | url-status = dead }}</ref> which he used to maintain his [[personal homepage]]. He extended them to work with [[web form]]s and to communicate with [[database]]s, and called this implementation "Personal Home Page/Forms Interpreter" or PHP/FI.
An example of the early PHP [[Syntax (programming languages)|syntax]]:<ref>{{cite web|last=Lerdorf|first=Rasmus|year=2007|title=Slide 3|url=http://talks.php.net/show/mysql07key/3|access-date=2009-06-22|work=slides for 'PHP on Hormones' talk|publisher=The PHP Group}}</ref>
<syntaxhighlight lang="
<!--include /text/header.html-->
<!--getenv HTTP_USER_AGENT-->
<!--
Hey, you are using Netscape!<p>
<!--endif-->
Line 77 ⟶ 65:
</syntaxhighlight>
PHP/FI could be used to build simple, [[dynamic web application]]s. To accelerate [[software bug|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.<ref name="Lerdorf-1995">{{cite web|url= https://groups.google.com/group/comp.infosystems.www.authoring.cgi/msg/cc7d43454d64d133?pli=1 |title=Announce: Personal Home Page Tools (PHP Tools)|last=Lerdorf|first=Rasmus|date=June 8, 1995|access-date=7 June 2011}}</ref><ref>{{cite newsgroup | title = Announce: Personal Home Page Tools (PHP Tools) | author = Lerdorf, Rasmus | date = 1995-06-08 | newsgroup = comp.infosystems.www.authoring.cgi | url = https://groups.google.com/group/comp.infosystems.www.authoring.cgi/msg/cc7d43454d64d133 | access-date = 2006-09-17}}</ref> This release included basic functionality such as [[Local variable#Local variables in Perl|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.<ref name="php.net-3" /><ref name="The PHP Group" />
Early PHP was never intended to be a new [[Programming language theory|programming language]]; rather, it grew organically, with Lerdorf noting in retrospect: "I don't know how to stop it [...] there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language [...] I just kept adding the next logical step on the way."<ref name="Rasmus Lerdorf-2003">{{cite web|title = Rasmus Lerdorf, Senior Technical Yahoo: PHP, Behind the Mic|date = 2003-11-19|url =http://itc.conversationsnetwork.org/shows/detail58.html|archive-url = https://web.archive.org/web/20130728125152/http://itc.conversationsnetwork.org/shows/detail58.html|archive-date = 2013-07-28}}</ref> A development team began to form and, after months of work and [[Beta development stage|beta]] testing, officially released PHP/FI 2 in November 1997.<ref>{{Cite web |last1=Alshetwi |first1=A.B. |last2=Rahmat |first2=R. A. A. O. |last3=Borhan |first3=M. N. |last4=Ismael |first4=S. |last5=Ali |first5=A. |last6=Irtema |first6=H. I. M. |last7=Alfakhria |first7=A. Y. |date=2018 |title=Web-Based Expert System for Optimizing of Traffic Road in Developing Countries |url=https://www.researchgate.net/publication/326727672 |access-date=13 Feb 2024}}</ref>
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.<ref>{{cite web|title=Problems with PHP|url=http://toykeeper.net/soapbox/php_problems/|access-date=20 December 2010}}</ref> In some cases, the function names were chosen to match the lower-level libraries which PHP was "wrapping",<ref>{{cite web|url=http://news.php.net/php.internals/70950 |title=php.internals: Re: Function name consistency |website=news.php.net |date=2013-12-28 |access-date=2014-02-09}}</ref> 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]].<ref name="Rasmus Lerdorf-2013">{{cite newsgroup |title=Re: Flexible function naming |author=[[Rasmus Lerdorf]] |date=Dec 16, 2013 |newsgroup=php.internals |url=http://news.php.net/php.internals/70691 |access-date=December 26, 2013}}</ref>
=== PHP 3 and 4 ===
[[File:Custom-software-developement-php-net.JPG|thumb|This is an example of
[[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''.<ref name="
On 22 May
=== PHP 5 ===
On 1 July
Many high-profile open-source projects ceased to support PHP 4 in new code
Over time, PHP interpreters became available on most existing [[32-bit]] and [[64-bit]] operating systems, either by building them from the PHP source code
| url =
| title = PHP Installation and Configuration
| access-date = 2013-10-29
| website = php.net
}}</ref> For PHP versions 5.3 and 5.4, the only available [[Microsoft Windows]] binary distributions were 32-bit [[IA-32]] builds,<ref>{{cite web
| url =
| title = PHP for Windows: Binaries and sources releases (5.3)
| access-date = 2013-10-29
| website = php.net
}}</ref><ref>{{cite web
| url =
| title = PHP for Windows: Binaries and sources releases (5.4)
| access-date = 2013-10-29
| website = php.net
}}</ref> 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.<ref>{{cite web
| url =
| title = PHP for Windows: Binaries and sources releases (5.5)
| access-date = 2013-10-29
Line 114 ⟶ 104:
}}</ref>
Official security support for PHP 5.6 ended on 31 December 2018
=== <span id="PHP6-UNICODE">PHP 6 and Unicode</span> ===
Line 123 ⟶ 113:
| website = PHP.net
}}</ref><ref>{{cite web
| url =
| title = Details of the String Type (PHP Manual)
| access-date =
| website = PHP.net
}}</ref> 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.<ref>{{cite mailing list|url=http://marc.info/?l=php-internals&m=112365908921757&w=1|title=PHP Unicode support design document|date=2005-08-10|access-date=2014-02-09|author=Andrei Zmievski}}</ref> 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.<ref>{{cite web|url=http://news.php.net/php.internals/17668|title=PHP 5.5 or 6.0|access-date=2014-02-09}}</ref>
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.<ref>{{cite web|title=The Good, the Bad, and the Ugly: What Happened to Unicode and PHP 6|url=http://www.slideshare.net/andreizm/the-good-the-bad-and-the-ugly-what-happened-to-unicode-and-php-6|access-date=2014-02-09|author=Andrei Zmievski|date=2011-04-22}}</ref> As a result, a PHP 5.3 release was created in 2009, with many non-Unicode features back-ported from PHP 6, notably namespaces. In March 2010, the project in its current form was officially abandoned, and a PHP 5.4 release was prepared
=== PHP 7 ===
During 2014 and 2015, a new major PHP version was developed,
The foundation of PHP
Because of the major internal changes in phpng, it must receive a new [[Software versioning|major version]] number of PHP, rather than a minor PHP 5 release, according to PHP's release process.<ref name="
* Many fatal
* The syntax for variable dereferencing was reworked to be internally more consistent and complete, allowing the use of the operators <code>-></code>, <code>[]</code>, <code>()</code>,<code>{}</code>, and <code>::</code>, with arbitrary meaningful left-side expressions.<ref name="
* Support for legacy PHP 4-style constructor methods was deprecated.<ref>{{
* The behavior of the [[
* Constructors for the few classes built-in to PHP which returned null upon failure were changed to throw an exception instead, for consistency.<ref>{{cite web|url=https://wiki.php.net/rfc/internal_constructor_behaviour|title=PHP RFC: Constructor behaviour of internal classes|access-date=2015-05-21|website=php.net}}</ref>
* Several unmaintained or deprecated [[server application programming interface]]s (SAPIs) and extensions were removed from the PHP core, most notably the legacy <code>mysql</code> extension.<ref>{{cite web|url=https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts|title=PHP RFC: Removal of dead or not yet PHP7 ported SAPIs and extensions|access-date=2015-05-21|website=php.net}}</ref>
* The behavior of the <code>list()</code> operator was changed to remove support for strings.<ref>{{cite web|url=https://wiki.php.net/rfc/fix_list_behavior_inconsistency|title=PHP RFC: Fix list() behavior inconsistency|access-date=2015-05-21|website=php.net}}</ref>
* Support was removed for legacy ASP-style delimiters <code><%</code> and <code>%></code> and <code><script language="php"> ... </script></code>.<ref>{{cite web|url=https://wiki.php.net/rfc/remove_alternative_php_tags|title=PHP RFC: Remove alternative PHP tags|access-date=2015-05-21|website=php.net}}</ref>
* An oversight allowing a [[switch statement]] to have multiple <code>default</code> clauses was fixed.<ref>{{cite web|url=https://wiki.php.net/rfc/switch.default.multiple|title=PHP RFC: Make defining multiple default cases in a switch a syntax error|access-date=2015-05-21|website=php.net}}</ref>
* Support for hexadecimal number support in some implicit conversions from strings to number types was removed.<ref>{{cite web|url=https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings|title=PHP RFC: Remove hex support in numeric strings|access-date=2015-05-21|website=php.net}}</ref>
* The [[left-shift operator|left-shift]] and [[right-shift operator|right-shift]] operators were changed to behave more consistently across platforms.<ref name="
* Conversions between
PHP
=== PHP 8 ===
PHP 8 was released on 26 November 2020, and is currently the second-most used PHP major version. PHP 8 is a major version and has breaking changes from previous versions.<ref name="Brent">{{cite web |author=Brent |title=What's new in PHP 8 |url=https://stitcher.io/blog/new-in-php-8 |website=Stitcher |access-date=22 September 2020}}</ref><ref name="PHP">{{cite web |title=PHP 8 Released|url=https://www.php.net/releases/8.0/en.php |website=PHP |access-date=27 November 2020}}</ref> New features and notable changes include:
==== Just-in-time compilation ====
[[Just-in-time compilation]] is supported in PHP 8.<ref name="wiki.php.net-2" />
PHP 8's [[just-in-time compilation|JIT compiler]] can provide substantial performance improvements for some use cases,<ref name="Brent-2">{{cite web |author=Brent |title=PHP 8: JIT performance in real-life web applications |url=https://stitcher.io/blog/jit-in-real-life-web-applications |website=Stitcher.io |access-date=4 October 2020}}</ref><ref>{{cite web |last1=Rethams |first1=Derick |title=PHP 8: A Quick Look at JIT |url=https://derickrethans.nl/a-quick-look-at-jit.html}}</ref> while (then PHP) developer Nikita Popov stated that the performance improvements for most websites will be less substantial than the upgrade from PHP 5 to PHP 7.<ref name="Popov-2020" /> Substantial improvements are expected more for mathematical-type operations than for common web-development use cases.<ref name="Popov-2020">{{cite web |last1=Popov |first1=Nikita |title="What's new in PHP 8.0?" Nikita Popov |date=13 July 2020 |url=https://www.youtube.com/watch?v=NbBRXwu1Md8 |archive-url=https://ghostarchive.org/varchive/youtube/20211211/NbBRXwu1Md8| archive-date=2021-12-11 |url-status=live|publisher=PHP fwdays |access-date=4 October 2020}}{{cbignore}}</ref> Additionally, the JIT compiler provides the future potential to move some code from C to PHP, due to the performance improvements for some use cases.<ref name="Daniele-2020">{{cite web |last1=Daniele |first1=Carlo |title=What's New in PHP 8 (Features, Improvements, and the JIT Compiler) |url=https://kinsta.com/blog/php-8/ |website=Kinsta |date=25 May 2020 |access-date=24 December 2020}}</ref>
==== Addition of the match expression ====
{{Main|PHP syntax and semantics#Match expression}}
PHP 8 introduced the {{code|match}} expression.<ref name="Redmond-2020">{{cite web |last1=Redmond |first1=Paul |title=Match Expression is Coming to PHP 8 |url=https://laravel-news.com/match-expression-php-8 |website=Laravel News |date=15 July 2020 |access-date=4 October 2020}}</ref> The match expression is conceptually similar to a {{code|switch}} statement and is more compact for some use cases.<ref name="PHP Watch">{{cite web |title=PHP 8.0: Match Expressions |url=https://php.watch/versions/8.0/match-expression |website=PHP Watch |access-date=4 October 2020}}</ref> Because {{code|match}} is an expression, its result can be assigned to a variable or returned from a function.<ref>{{cite web |last1=Barnes |first1=Eric |title=PHP 8 is now Released! |url=https://laravel-news.com/php-8 |website=Laravel News |date=27 November 2020 |access-date=24 December 2020 |ref=laravel-news-php-8-released}}</ref>
==== Type changes and additions ====
PHP 8 introduced union types, a new {{code|static}} return type, and a new {{code|mixed}} type.<ref name="Brent" />
"Attributes", often referred to as "annotations" in other programming languages, were added in PHP 8, which allow metadata to be added to classes.<ref name="Brent" />
{{code|throw}} was changed from being a statement to being an expression.<ref name="wiki.php.net-4" /> This allows exceptions to be thrown in places that were not previously possible.<ref name="Brent" />
==== Syntax changes and additions ====
PHP 8 includes changes to allow alternate, more concise, or more consistent syntaxes in a number of scenarios. For example, the nullsafe operator is similar to the [[null coalescing operator]] {{code|??}}, but used when calling methods.<ref name="wiki.php.net" /> The following code snippet will not throw an error if {{code|getBirthday()}} returns null:
<syntaxhighlight lang="php">
$human_readable_date = $user->getBirthday()?->diffForHumans();
</syntaxhighlight>
Constructor property promotion has been added as "[[syntactic sugar]]," allowing class properties to be set automatically when parameters are passed into a class [[Constructor (object-oriented programming)|constructor]].<ref name="Brent" /> This reduces the amount of [[boilerplate code]] that must be written.<ref>{{cite web |last1=Roose |first1=Brent |title=PHP 8: Constructor property promotion |url=https://stitcher.io/blog/constructor-promotion-in-php-8 |access-date=30 April 2024}}</ref>
Other minor changes include support for use of {{code|::class}} on objects, which serves as an alternative for the use of {{code|get_class()}};<ref name="Brent" /> non-capturing catches in try-catch blocks; variable syntax tweaks to resolve inconsistencies; support for named arguments; and support for trailing commas in parameter lists, which adds consistency with support for trailing commas in other contexts, such as in arrays.<ref name="PHP" />
==== Standard library changes and additions ====
* Weak maps were added in PHP 8. A {{code|WeakMap}} holds references to objects, but these references do not prevent such objects from being [[Garbage collection (computer science)|garbage collected]].<ref name="wiki.php.net-3" /> This can provide performance improvements in scenarios where data is being [[Cache (computing)|cached]]; this is of particular relevance for [[object–relational mapping]]s (ORM).<ref name="Brent" />
* Various adjustments to interfaces, such as adding support for creating {{code|DateTime}} objects from interfaces, and the addition of a {{code|Stringable}} interface that can be used for type hinting.<ref name="Brent" />
* Various new functions including {{code|lang=php|str_contains()}}, {{code|lang=php|str_starts_with()}}, and {{code|lang=php|str_ends_with()}};<ref name="Merchant-2020">{{cite web |last1=Merchant |first1=Amit |title=These new string functions are coming in PHP 8 |url=https://www.amitmerchant.com/new-string-functions-php8/ |website=Amit Merchant |date=13 June 2020 |access-date=4 October 2020}}</ref> {{code|lang=php|fdiv()}}; {{code|lang=php|get_debug_type()}}; and {{code|lang=php|get_resource_id()}}<ref name="Brent" />
* Object implementation of {{code|lang=php|token_get_all()}}<ref name="Brent" />
==== Additional changes ====
* Type annotations were also added into PHP's C source code itself to allow internal functions and methods to have "complete type information in reflection."<ref>{{cite web |last1=Popov |first1=Nikita |title=Call for participation: Annotating internal function argument and return types |url=https://externals.io/message/106522 |website=Externals |access-date=19 November 2020}}</ref>
* Inheritance with private methods<ref name="Brent" />
* Abstract methods in traits improvements<ref name="Brent" />
=== PHP 8.1 ===
PHP 8.1 was released on November 25, 2021.<ref>{{Cite web|url=https://www.php.net/ChangeLog-8.php#8.1.0 |title=PHP 8 ChangeLog |access-date=2024-01-05 |website=PHP.net}}</ref> It added support for [[enumerated type|enumerations]] (also called "enums"), declaring properties as <code>readonly</code> (which prevents modification of the property after initialization), and array unpacking with string keys. The new [[bottom type|never type]] can be used to indicate that a function does not return.<ref>{{Cite web|title=PHP: PHP 8.1.0 Release Announcement |url=https://www.php.net/releases/8.1/en.php |access-date=2024-01-05 |website=PHP.net}}</ref>
=== PHP 8.2 ===
PHP 8.2 was released on December 8, 2022.<ref>{{Cite web|url=https://www.php.net/ChangeLog-8.php#8.2.0 |title=PHP 8 ChangeLog |access-date=2024-01-05 |website=PHP.net}}</ref> New in this release are <code>readonly</code> classes (whose instance properties are implicitly readonly), [[disjunctive normal form]] (DNF) types, and the <code>random</code> extension, which provides a [[pseudorandom number generator]] with an object-oriented [[API]],<ref>{{Cite web|title=PHP: PHP 8.2.0 Release Announcement |url=https://www.php.net/releases/8.2/en.php |access-date=2024-01-05 |website=PHP.net}}</ref> Sensitive Parameter value redaction, and a ton of other features.
=== PHP 8.3 ===
PHP 8.3 was released on November 23, 2023. This release introduced readonly array properties, allowing arrays to be declared as immutable after initialization.{{citation needed|date=February 2025}} It also added support for class aliases for built-in PHP classes, new methods for random float generation in the Random extension, and enhanced PHP INI settings with fallback value support. Additionally, the new {{Mono|stream_context_set_options}} function provides improved API for stream manipulation, among other updates and deprecations.
=== PHP 8.4 ===
PHP 8.4 was released on November 21, 2024.
=== Release history ===
<!-- Template:Version
{{sticky header}}
{{mw-datatable}}
{| class="wikitable mw-datatable mw-collapsible sticky-header"
|-
! Version
! style="min-width:
! style="min-width:
! Notes
|-
| {{Version |o | 1.0}}
|
|
| Officially called "Personal Home Page Tools (PHP Tools)". This is the first use of the name "PHP".<ref name="
|-
| {{Version |o | 2.0}}
|
|
| Officially called "PHP/FI 2.0". This is the first release that could actually be characterised as PHP, being a standalone language with many features that have endured to the present day.
|-
| {{Version |o | 3.0}}
|
|
| Development moves from one person to multiple developers. Zeev Suraski and Andi Gutmans
|-
| {{Version |o | 4.0}}
| 22 May 2000<ref>{{cite web |title=PHP 4.0.0 Released |url=https://news-web.php.net/php.announce/22 |access-date=25 October 2020}}</ref>
|
| Added more advanced two-stage parse/execute tag-parsing system called the Zend engine.<ref name="
|-
| {{Version |o | 4.1}}
| 10 December 2001<ref>{{cite web |title=PHP 4.1.0 Release Announcement |url=https://www.php.net/releases/4_1_0.php |access-date=25 October 2020}}</ref>
|
| Introduced "superglobals" ({{code|lang=php|$_GET}}, {{code|lang=php|code=$_POST}}, {{code|lang=php|code=$_SESSION}}, etc.)<ref name="
|-
| {{Version |o | 4.2}}
| 22 April 2002<ref>{{cite web |title=PHP 4.2.0 Release Announcement |url=https://www.php.net/releases/4_2_0.php |access-date=25 October 2020}}</ref>
|
| Disabled <code>register_globals</code> by default. Data received over the network is not inserted directly into the [[global variable|global]] namespace anymore, closing possible security holes in applications.<ref name="
|-
| {{Version |o | 4.3}}
| 27 December 2002<ref>{{cite web |title=PHP 4.3.0 Release Announcement |url=https://www.php.net/releases/4_3_0.php |access-date=25 October 2020}}</ref>
|
| Introduced the [[command-line interface]] (CLI), to supplement the CGI.<ref name="
|-
| {{Version |o | 4.4}}
| 11 July 2005<ref>{{cite web |title=PHP 4.4.0 Release Announcement |url=https://www.php.net/releases/4_4_0.php |access-date=25 October 2020}}</ref>
|
| Fixed a memory corruption bug, which required breaking binary compatibility with extensions compiled against PHP version 4.3.x.<ref
|-
| {{Version |o | 5.0}}
| 13 July 2004<ref>{{cite web |title=PHP 5.0.0 Released! |url=https://news-web.php.net/php.announce/50 |access-date=25 October 2020}}</ref>
|
| Zend Engine II with a new object model.<ref name="
|-
| {{Version |o | 5.1}}
| 24 November 2005<ref>{{cite web |title=PHP 5.1.0 Release Announcement |url=https://www.php.net/releases/5_1_0.php |access-date=25 October 2020}}</ref>
|
| Performance improvements with the introduction of compiler variables in re-engineered PHP Engine.<ref name="
|-
| {{Version |o | 5.2}}
| 2 November 2006<ref>{{cite web |title=PHP 5.2.0 Release Announcement |url=https://www.php.net/releases/5_2_0.php |access-date=25 October 2020}}</ref>
|
| Enabled the filter extension by default. Native [[JSON]] support.<ref name="
|-
| {{Version |o | 5.3}}
| 30 June 2009<ref>{{cite web |title=PHP 5.3.0 Release Announcement |url=https://www.php.net/releases/5_3_0.php |access-date=25 October 2020}}</ref>
|
| [[Namespace]] support; [[name binding|late static bindings]], jump label (limited [[goto]]), [[anonymous function]]s, [[closure (computer
|-
| {{Version |o | 5.4}}
| 1 March 2012<ref>{{cite web |title=PHP 5.4.0 Release Announcement |url=https://www.php.net/releases/5_4_0.php |access-date=25 October 2020}}</ref>
|
| [[trait (computer programming)|Trait]] support, short array syntax support. Removed items: <code>register_globals</code>, <code>safe_mode</code>, <code>allow_call_time_pass_reference</code>, {{code|lang=php|code=session_register()}}, {{code|lang=php|code=session_unregister()}} and {{code|lang=php|code=session_is_registered()}}. Built-in web server.<ref>{{cite web|url=https://php.net/manual/en/features.commandline.webserver.php |title=Built-in web server |access-date=March 26, 2012}}</ref> Several improvements to existing features, performance and reduced memory requirements.
|-
| {{Version |o | 5.5}}
| 20 June 2013<ref>{{cite web |title=PHP 5.5.0 Release Announcement |url=https://www.php.net/releases/5_5_0.php |access-date=25 October 2020}}</ref>
| 10 July 2016<ref name="
| Support for [[
|-
| {{Version |o | 5.6}}
| 28 August 2014<ref>{{cite web |title=PHP 5.6.0 Release Announcement |url=https://www.php.net/releases/5_6_0.php |access-date=25 October 2020}}</ref>
|
| Constant scalar expressions, [[variadic function]]s, argument unpacking, new exponentiation operator, extensions of the <code>use</code> statement for functions and constants, new <code>phpdbg</code> debugger as a SAPI module, and other smaller improvements.<ref name="
|-
| style="background:silver;"| 6.x
| {{n/a|Not released}}
| {{n/a}}
| Abandoned version of PHP that planned to include native Unicode support.<ref>{{cite web|last1=Corbet |first1=Jonathan |url=https://lwn.net/Articles/379909/|title=Resetting PHP 6|date=24 March 2010 |quote=There have been books on the shelves purporting to cover PHP 6 since at least 2008. But, in March 2010, the PHP 6 release is not out{{snd}} in fact, it is not even close to out. Recent events suggest that PHP 6 will not be released before 2011{{snd}} if, indeed, it is released at all.}}</ref><ref>{{cite
|-
| {{Version |o | 7.0}}
|
|
| Zend Engine 3 (performance improvements<ref name="
|-
| {{Version |
| 1 December 2016
| 1 December 2019<ref name="
| {{code|lang=php|iterable}} type,<ref>{{cite web|url=https://wiki.php.net/rfc/iterable|title=PHP: rfc:iterable|website=php.net|date=2016-06-10|access-date=2023-06-30}}</ref> nullable types,<ref>{{cite web|url=https://wiki.php.net/rfc/nullable_types|title=PHP: rfc:nullable_types|website=php.net|date=2014-04-10|access-date=2023-06-30}}</ref> [[Void type|{{code|lang=php|void}} return type]],<ref>{{cite web|url=http://wiki.php.net/rfc/void_return_type|title=PHP: rfc:void_return_type|website=php.net|date=2015-11-09|access-date=2015-11-14}}</ref> class constant [[information hiding|visibility modifiers]],<ref>{{cite web|url=https://wiki.php.net/rfc/class_const_visibility|title=PHP: rfc:class_constant_visibility|website=php.net|date=2015-10-27|access-date=2015-12-08}}</ref> short list syntax,<ref>{{cite web|url=https://wiki.php.net/rfc/short_list_syntax|title=PHP: rfc:short_list_syntax|website=php.net|date=2016-04-07|access-date=2023-06-30}}</ref> multi-catch<ref>{{cite web|url=https://wiki.php.net/rfc/multiple-catch|title=PHP: rfc:multiple-catch|website=php.net|date=2016-03-06|access-date=2023-06-30}}</ref>
|-
| {{Version |
| 30 November 2017
| 30 November 2020<ref name="
| Object parameter and return type
|-
| {{Version |
| 6 December 2018<ref>{{cite web|url=https://wiki.php.net/todo/php73|title=PHP: todo:php73|website=wiki.php.net}}</ref>
| 6 December 2021
| Flexible [[Here document#PHP|Heredoc]] and Nowdoc syntax,<ref>{{cite web|url=https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes|title=PHP: rfc:flexible_heredoc_nowdoc_syntaxes|website=wiki.php.net}}</ref> support for reference assignment and array deconstruction with {{code|lang=php|code=list()}},<ref>{{cite web|url=https://wiki.php.net/rfc/list_reference_assignment|title=PHP: rfc:list_reference_assignment|website=wiki.php.net}}</ref> PCRE2 support,<ref>{{cite web|url=https://wiki.php.net/rfc/pcre2-migration|title=PHP: rfc:pcre2-migration|website=wiki.php.net}}</ref> {{code|lang=php|code=hrtime
|-
| {{Version |o | 7.4}}
| 28 November 2019<ref>{{Cite web|url=https://www.php.net/archive/2019.php#2019-11-28-1|title=PHP 7.4.0 Released!|website=php.net|access-date=2019-11-28}}</ref>
| 28 November 2022
| Typed properties 2.0,<ref>{{Cite web|url=https://wiki.php.net/rfc/typed_properties_v2|title=PHP: rfc:typed_properties_v2|website=wiki.php.net|access-date=2019-04-04}}</ref> preloading,<ref>{{Cite web|url=https://wiki.php.net/rfc/preload|title=PHP: rfc:preload|website=wiki.php.net|access-date=2019-04-04}}</ref> null-coalescing assignment operator,<ref>{{Cite web|url=https://wiki.php.net/rfc/null_coalesce_equal_operator|title=PHP: rfc:null_coalesce_equal_operator|website=wiki.php.net|access-date=2019-04-04}}</ref> improve {{code|lang=php|code=openssl_random_pseudo_bytes}},<ref>{{Cite web|url=https://wiki.php.net/rfc/improve-openssl-random-pseudo-bytes|title=PHP: rfc:improve-openssl-random-pseudo-bytes|website=wiki.php.net|access-date=2019-04-04}}</ref> weak references,<ref name="wiki.php.net-3">{{Cite web|url=https://wiki.php.net/rfc/weakrefs|title=PHP: rfc:weakrefs|website=wiki.php.net|access-date=2019-04-05}}</ref> [[foreign function interface]] (FFI),<ref>{{Cite web|url=https://wiki.php.net/rfc/ffi|title=PHP: rfc:ffi|website=wiki.php.net|access-date=2019-04-05}}</ref> always available hash extension,<ref>{{Cite web|url=https://wiki.php.net/rfc/permanent_hash_ext|title=PHP: rfc:permanent_hash_ext|website=wiki.php.net|access-date=2019-04-05}}</ref> password hash registry,<ref>{{Cite web|url=https://wiki.php.net/rfc/password_registry|title=PHP: rfc:password_registry|website=wiki.php.net|access-date=2019-04-05}}</ref> multibyte string splitting,<ref>{{Cite web|url=https://wiki.php.net/rfc/mb_str_split|title=PHP: rfc:mb_str_split|website=wiki.php.net|access-date=2019-04-05}}</ref> reflection for references,<ref>{{Cite web|url=https://wiki.php.net/rfc/reference_reflection|title=PHP: rfc:reference_reflection|website=wiki.php.net|access-date=2019-04-05}}</ref> unbundle ext/wddx,<ref>{{Cite web|url=https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx|title=PHP: rfc:deprecate-and-remove-ext-wddx|website=wiki.php.net|access-date=2019-04-05}}</ref> new custom object serialization mechanism<ref>{{Cite web|url=https://wiki.php.net/rfc/custom_object_serialization|title=PHP: rfc:custom_object_serialization|website=wiki.php.net|access-date=2019-04-05}}</ref>
|-
| {{Version |o | 8.0}}
| 26 November 2020<ref>{{Cite web|url=https://www.php.net/supported-versions.php|title=PHP: Supported Versions|website=php.net|access-date=2023-11-26}}</ref>
| 26 November 2023
| [[just-in-time compilation|Just-In-Time (JIT) compilation]],<ref name="wiki.php.net-2">{{Cite web|url=https://wiki.php.net/rfc/jit|title=PHP: rfc:jit|website=wiki.php.net|access-date=2019-04-05}}</ref> arrays starting with a negative index,<ref>{{Cite web|url=https://wiki.php.net/rfc/negative_array_index|title=PHP: rfc:negative_array_index|website=wiki.php.net|access-date=2019-04-05}}</ref> stricter/saner language semantics (validation for abstract trait methods),<ref>{{cite web |title=PHP RFC: Validation for abstract trait methods |url=https://wiki.php.net/rfc/abstract_trait_method_validation |website=wiki.php.net |access-date=14 August 2020}}</ref> saner string to number comparisons,<ref>{{cite web |title=PHP RFC: Saner string to number comparisons |url=https://wiki.php.net/rfc/string_to_number_comparison |website=wiki.php.net |access-date=14 August 2020}}</ref> saner numeric strings,<ref>{{cite web |title=PHP RFC: Saner numeric strings |url=https://wiki.php.net/rfc/saner-numeric-strings |website=wiki.php.net |access-date=14 August 2020}}</ref> {{code|lang=php|TypeError}} on invalid arithmetic/bitwise operators,<ref>{{cite web |title=PHP RFC: Stricter type checks for arithmetic/bitwise operators |url=https://wiki.php.net/rfc/arithmetic_operator_type_checks |website=wiki.php.net |access-date=14 August 2020}}</ref> reclassification of various engine errors,<ref>{{cite web |title=PHP RFC: Reclassifying engine warnings |url=https://wiki.php.net/rfc/engine_warnings |website=wiki.php.net |access-date=14 August 2020}}</ref> consistent type errors for internal functions,<ref>{{Cite web|url=https://wiki.php.net/rfc/consistent_type_errors|title=PHP: rfc:consistent_type_errors|website=wiki.php.net|access-date=2019-04-05}}</ref> fatal error for incompatible method signatures<ref>{{Cite web|url=https://wiki.php.net/rfc/lsp_errors|title=PHP: rfc:lsp_errors|website=wiki.php.net|access-date=2019-05-26}}</ref>), locale-independent float to string conversion,<ref>{{cite web |title=PHP RFC: Locale-independent float to string cast |url=https://wiki.php.net/rfc/locale_independent_float_to_string |website=wiki.php.net |access-date=14 August 2020}}</ref> variable syntax tweaks,<ref>{{cite web |title=PHP RFC: Variable Syntax Tweaks |url=https://wiki.php.net/rfc/variable_syntax_tweaks|website=wiki.php.net |access-date=14 August 2020}}</ref> attributes,<ref>{{cite web |title=PHP RFC: Attributes V2 |url=https://wiki.php.net/rfc/attributes_v2 |website=wiki.php.net |access-date=14 August 2020}}</ref><ref>{{Cite web|title=PHP RFC: Attribute Amendments|url=https://wiki.php.net/rfc/attribute_amendments |website=wiki.php.net |access-date=14 August 2020}}</ref><ref>{{Cite web|title=PHP RFC: Shorter Attribute Syntax|url=https://wiki.php.net/rfc/shorter_attribute_syntax|access-date=2020-06-20|website=wiki.php.net}}</ref><ref>{{cite web |title=PHP RFC: Shorter Attribute Syntax Change |url=https://wiki.php.net/rfc/shorter_attribute_syntax_change |website=wiki.php.net |access-date=14 August 2020}}</ref> named arguments,<ref>{{cite web |title=PHP RFC: Named Arguments |url=https://wiki.php.net/rfc/named_params |website=wiki.php.net |access-date=14 August 2020}}</ref> match expression,<ref>{{cite web |title=PHP RFC: Match expression v2 |url=https://wiki.php.net/rfc/match_expression_v2 |website=wiki.php.net |access-date=14 August 2020}}</ref> constructor property promotion,<ref>{{cite web |title=PHP RFC: Constructor Property Promotion |url=https://wiki.php.net/rfc/constructor_promotion |website=wiki.php.net |access-date=14 August 2020}}</ref> union types,<ref>{{cite web |title=PHP RFC: Union Types 2.0 |url=https://wiki.php.net/rfc/union_types_v2 |website=wiki.php.net |access-date=14 August 2020}}</ref> {{code|lang=php|mixed}} type,<ref>{{cite web |title=PHP RFC: Mixed Type v2 |url=https://wiki.php.net/rfc/mixed_type_v2 |website=wiki.php.net |access-date=14 August 2020}}</ref> static return type,<ref>{{cite web |title=PHP RFC: Static return type |url=https://wiki.php.net/rfc/static_return_type |website=wiki.php.net |access-date=14 August 2020}}</ref> nullsafe operator,<ref name="wiki.php.net">{{cite web |title=PHP RFC: Nullsafe operator |url=https://wiki.php.net/rfc/nullsafe_operator |website=wiki.php.net |access-date=14 August 2020}}</ref> non-capturing catches,<ref>{{cite web |title=PHP RFC: non-capturing catches |url=https://wiki.php.net/rfc/non-capturing_catches |website=wiki.php.net |access-date=14 August 2020}}</ref> {{code|lang=php|throw}} expression,<ref name="wiki.php.net-4">{{cite web |title=PHP RFC: throw expression |url=https://wiki.php.net/rfc/throw_expression |website=wiki.php.net |access-date=14 August 2020}}</ref> JSON extension is always available.<ref name="Andre">{{cite web |last1=Andre |first1=Tyson |title=PHP RFC: Always available JSON extension |url=https://wiki.php.net/rfc/always_enable_json |website=PHP |access-date=25 October 2020}}</ref>
|-
| {{Version |co | 8.1}}
| 25 November 2021<ref>{{Cite web |title=PHP: todo:php81 |url=https://wiki.php.net/todo/php81 |access-date=2022-06-16 |website=wiki.php.net}}</ref>
| 31 December 2025
| Explicit octal integer literal notation,<ref>{{Cite web|url=https://wiki.php.net/rfc/explicit_octal_notation|title=PHP RFC: Explicit octal integer literal notation|website=wiki.php.net|access-date=2020-11-25}}</ref> enumerations,<ref>{{Cite web|url=https://wiki.php.net/rfc/enumerations|title=PHP RFC: Enumerations|website=wiki.php.net|access-date=2021-03-25}}</ref> read-only properties,<ref>{{Cite web|title=PHP: rfc:readonly_properties_v2|url=https://wiki.php.net/rfc/readonly_properties_v2|access-date=2021-11-26|website=wiki.php.net}}</ref> first-class callable syntax,<ref>{{Cite web|title=PHP: rfc:first_class_callable_syntax|url=https://wiki.php.net/rfc/first_class_callable_syntax|access-date=2021-11-26|website=wiki.php.net}}</ref> {{code|lang=php|new}} in initializers,<ref>{{Cite web|title=PHP: rfc:new_in_initializers|url=https://wiki.php.net/rfc/new_in_initializers|access-date=2021-11-26|website=wiki.php.net}}</ref> pure intersection types,<ref>{{Cite web|title=PHP: rfc:pure-intersection-types|url=https://wiki.php.net/rfc/pure-intersection-types|access-date=2021-11-26|website=wiki.php.net}}</ref> {{code|lang=php|never}} return type,<ref>{{Cite web|title=PHP: rfc:noreturn_type|url=https://wiki.php.net/rfc/noreturn_type|access-date=2021-11-26|website=wiki.php.net}}</ref> {{code|lang=php|final}} class constraints,<ref>{{Cite web|title=PHP: rfc:final_class_const|url=https://wiki.php.net/rfc/final_class_const|access-date=2021-11-26|website=wiki.php.net}}</ref> fibers<ref>{{Cite web|title=PHP: rfc:fibers|url=https://wiki.php.net/rfc/fibers|access-date=2021-11-26|website=wiki.php.net}}</ref>
|-
| {{Version |co |8.2}}
| 8 December 2022<ref>{{Cite web |title=PHP: todo:php82 |url=https://wiki.php.net/todo/php82 |access-date=2022-06-16 |website=wiki.php.net}}</ref>
| 31 December 2026
| Readonly classes,<ref>{{Cite web |title=PHP: rfc:readonly_classes |url=https://wiki.php.net/rfc/readonly_classes |access-date=2022-06-16 |website=wiki.php.net}}</ref> {{code|lang=php|code=null}}, {{code|lang=php|code=false}}, and {{code|lang=php|code=true}} as stand-alone types,<ref>{{Cite web |title=PHP: rfc:null-false-standalone-types |url=https://wiki.php.net/rfc/null-false-standalone-types |access-date=2022-06-16 |website=wiki.php.net}}</ref><ref>{{Cite web |title=PHP: rfc:true-type |url=https://wiki.php.net/rfc/true-type |access-date=2022-06-16 |website=wiki.php.net}}</ref> locale-independent case conversion,<ref>{{Cite web |title=PHP: rfc:strtolower-ascii |url=https://wiki.php.net/rfc/strtolower-ascii |access-date=2022-06-16 |website=wiki.php.net}}</ref> disjunctive normal form types,<ref>{{Cite web |title=PHP: rfc:dnf_types |url=https://wiki.php.net/rfc/dnf_types |access-date=2023-02-07 |website=wiki.php.net}}</ref> constants in traits<ref>{{Cite web |title=PHP: rfc:constants_in_traits |url=https://wiki.php.net/rfc/constants_in_traits |access-date=2023-02-07 |website=wiki.php.net}}</ref>
|-
| {{Version |co | 8.3}}
| 23 November 2023<ref>{{Cite web |date=23 November 2023 |title=PHP 8.3.0 Released! |url=https://www.php.net/archive/2023.php#2023-11-23-2 |access-date=24 November 2023 |website=php.net}}</ref>
| 31 December 2027
| Typed class constants,<ref>{{Cite web |title=PHP: rfc:typed_class_constants |url=https://wiki.php.net/rfc/typed_class_constants |access-date=2023-12-17 |website=wiki.php.net}}</ref> dynamic class constant fetch,<ref>{{Cite web |title=PHP: rfc:dynamic_class_constant_fetch |url=https://wiki.php.net/rfc/dynamic_class_constant_fetch |access-date=2023-12-17 |website=wiki.php.net}}</ref> {{code|lang=php|code=#[\Override]}} attribute,<ref>{{Cite web |title=PHP: rfc:marking_overriden_methods |url=https://wiki.php.net/rfc/marking_overriden_methods |access-date=2023-12-17 |website=wiki.php.net}}</ref> deep-cloning of read-only properties,<ref>{{Cite web |title=PHP: rfc:readonly_amendments |url=https://wiki.php.net/rfc/readonly_amendments |access-date=2023-12-17 |website=wiki.php.net}}</ref> new {{code|lang=php|code=json_validate}} function,<ref>{{Cite web |title=PHP: rfc:json_validate |url=https://wiki.php.net/rfc/json_validate |access-date=2023-12-17 |website=wiki.php.net}}</ref> randomizer additions,<ref>{{Cite web |title=PHP: rfc:randomizer_additions |url=https://wiki.php.net/rfc/randomizer_additions |access-date=2023-12-17 |website=wiki.php.net}}</ref> the command-line linter supports multiple files
|-
| {{Version |c | 8.4}}
| 21 November 2024<ref>{{Cite web |date=26 March 2024 |title=PHP: todo: php84|url=https://wiki.php.net/todo/php84 |access-date=26 March 2024 |website=php.net}}</ref>
| 31 December 2028
| Property hooks, asymmetric visibility, an updated DOM API, performance improvements, bug fixes, and general cleanup.
|-
| {{Version |
|
| 31 December
| Pipe Operator {{code|lang=php|{{!}}>}}<ref>{{Cite web |title=PHP: rfc:pipe-operator-v3 |url=https://wiki.php.net/rfc/pipe-operator-v3 |access-date=2025-08-06 |website=wiki.php.net}}</ref>
|-
|- class="sortbottom"
| colspan="4" | {{Version |l |show=111111}}
|}
Beginning on 28 June
== <span id=ELEPHPANT>Mascot</span> ==
[[File:Webysther 20160423 - Elephpant.svg|thumb|200px|The elePHPant, PHP mascot]]
The mascot of the PHP project is the ''elePHPant'', a blue [[elephant]] with the PHP logo on its side, designed by Vincent Pontier<ref>{{cite web|title=PHP: ElePHPant|url=https://php.net/elephpant.php|date=4 Oct 2014|access-date=4 Oct 2014}}</ref> in 1998.<ref>{{cite web|url=https://wwphp-fb.github.io/faq/community/elephpant/|title=Redirecting…|website=wwphp-fb.github.io}}</ref> "The (PHP) letters were forming the shape of an elephant if viewed in a sideways angle."<ref>{{cite web|url=https://7php.com/elephpant/|title=The PHP Mascot's Birth
The elePHPant is sometimes differently coloured when in [[plush toy]] form.<ref>{{Cite web |title=ElePHPant |url=https://docs.php.earth/php/community/elephpant/ |access-date=2024-02-13 |website=PHP.earth |language=en}}</ref> Many variations of this physical mascot have been made over the years. Only the elePHPants based on the original design by Vincent Pontier are considered official by the community.<ref>{{
== Syntax ==
{{Main|PHP syntax and semantics}}
[[File:"Hello World" Application in PHP.png|thumb|A "Hello, World" application in PHP 7.4 running on its built-in development server]]
The following [["Hello, World!" program]] is written in PHP code embedded in an [[HTML]] document:
<syntaxhighlight lang="html+php" highlight="7-9">
<!DOCTYPE html>
<html>
<title>PHP "Hello, World!" program</title>
</html>
</syntaxhighlight>
However, as no requirement exists for PHP code to be embedded in HTML, the simplest version of ''Hello, World!'' may be written like this, with the closing tag <syntaxhighlight lang="PHP" inline="">?></syntaxhighlight> omitted as preferred in files containing pure PHP code.<ref>{{cite web|url=https://www.php.net/manual/en/language.basic-syntax.phptags.php |title=tags{{snd}} Manual |website=php.net |access-date=2014-02-17}}</ref>
<syntaxhighlight lang="
</syntaxhighlight>
The PHP interpreter only executes PHP code within its [[delimiter]]s. Anything outside of its delimiters is not processed by PHP, although the non-PHP text is still subject to [[control structure]]s described in PHP code. The most common delimiters are <syntaxhighlight lang="PHP" inline=""><?php</syntaxhighlight> to open and <syntaxhighlight lang="PHP" inline="">?></syntaxhighlight> to close PHP sections. The shortened form <syntaxhighlight lang="PHP" inline=""><?</syntaxhighlight> also exists. This short delimiter makes script files less portable since support for them can be disabled in the local PHP configuration and it is therefore discouraged.<ref name="php.net-2008" /><ref name="The PHP Group-3">{{cite web|title=PHP: Basic syntax|url=https://www.php.net/manual/en/language.basic-syntax.php|publisher=The PHP Group|access-date=2008-02-22}}</ref> Conversely, there is no recommendation against the echo short tag <syntaxhighlight lang="PHP" inline=""><?=</syntaxhighlight>.<ref>{{cite web|access-date=2016-01-03|url=https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md|title=Basic Coding Standard|publisher=PHP Framework Interoperability Group}}</ref> Prior to PHP 5.4.0, this short syntax for <syntaxhighlight lang="php" inline="">echo</syntaxhighlight> only works with the <code>short_open_tag</code> configuration setting enabled, while for PHP 5.4.0 and later it is always available.<ref>{{cite web|url=https://www.php.net/echo |title=echo{{snd}} Manual |website=php.net |access-date=2014-02-17}}</ref><ref>{{cite web|url=https://www.php.net/manual/en/ini.core.php#ini.short-open-tag |title=Description of core php.ini directives{{snd}} Manual |website=php.net |date=2002-03-17 |access-date=2014-02-17}}</ref><ref name="php.net-2008">{{cite web |url=http://wiki.php.net/rfc/shortags |title=PHP: rfc:shortags |website=php.net |date=2008-04-03 |access-date=2014-05-08 }}</ref> The purpose of all these delimiters is to separate PHP code from non-PHP content, such as [[JavaScript]] code or HTML markup.<ref>{{cite web|access-date=2008-02-25|url=https://www.php.net/manual/en/tutorial.firstpage.php|title=Your first PHP-enabled page |publisher=The PHP Group}}</ref> So the shortest [["Hello, World!" program]] written in PHP is:
<syntaxhighlight lang="html+php">
<?='Hello, World!';
</syntaxhighlight>
The first form of delimiters, <syntaxhighlight lang="PHP" inline><?php</syntaxhighlight> and <syntaxhighlight lang="PHP" inline>?></syntaxhighlight>, in [[XHTML]] and other [[XML]] documents, creates correctly formed XML processing instructions.<ref>{{cite web | url = http://www.w3.org/TR/2008/REC-xml-20081126/#sec-pi | title = Processing Instructions | work = Extensible Markup Language (XML) 1.0 (Fifth Edition) | publisher = W3C | date = 26 November 2008 | last = Bray | first = Tim | access-date = 2009-06-18|display-authors=etal}}</ref> This means that the resulting mixture of PHP code and other markups in the server-side file is itself well-formed XML.
{{Anchor|TYPE-HINTING}}
Variables are [[sigil (computer programming)|prefixed]] with a [[dollar sign|dollar symbol]], and a [[primitive type|type]] does not need to be specified in advance. PHP 5 introduced ''type declarations'' that allow functions to force their parameters to be objects of a specific class, arrays, interfaces or [[callback function]]s. However, before PHP 7, type declarations could not be used with scalar types such as integers or strings.<ref name="php.net-2015b" />
Below is an example of how PHP variables are declared and initialized.
<syntaxhighlight lang="php">
<?php
$name = 'John'; // variable of string type being declared and initialized
$age = 18; // variable of integer type being declared and initialized
$height = 5.3; // variable of double type being declared and initialized
echo $name . ' is ' . $height . "m tall\n"; // concatenating variables and strings
echo "$name is $age years old."; // interpolating variables to string
?>
</syntaxhighlight>
Unlike function and class names, variable names are case
In terms of keywords and language syntax, PHP is similar to
=== Data types ===
PHP is [[strong and weak typing|loosely typed]]. It stores integers in a platform-dependent range, either as a
[[Floating
The null data type represents a variable that has no value; <code>NULL</code> is the only allowed value for this data type.<ref name="
Variables of the "resource" type represent references to resources from external sources. These are typically created by functions from a particular extension, and can only be processed by functions from the same extension; examples include file, image, and database resources.<ref name="
Arrays can contain elements of any type that PHP can handle, including resources, objects, and even other arrays. Order is preserved in lists of values and in [[hash table|hashes]] with both keys and values, and the two can be intermingled.<ref name="
The '''Standard PHP Library''' (SPL) attempts to solve standard problems and implements efficient data access interfaces and classes.<ref>{{cite web | url =
=== Functions ===
PHP defines a large array of functions in the core language and many are also available in various extensions; these functions are well documented
Custom functions may be defined by the developer:
<syntaxhighlight lang="php">
function myAge(int $birthYear):
{ // calculate the age by subtracting the birth year from the current year.
$yearsOld = date('Y') - $birthYear;
// return the age in a descriptive string.
return $yearsOld
}
Line 349 ⟶ 435:
</syntaxhighlight>
In lieu of [[function pointer]]s, functions in PHP can be referenced by a string containing their name. In this manner, normal PHP functions can be used, for example, as [[Callback function|callbacks]] or within [[function table]]s.<ref name="
| url =
| title = User-defined functions (PHP manual)
| date = 2014-07-04 | access-date = 2014-07-07
| website = php.net
}}</ref><ref name="
| url =
| title = Variable functions (PHP manual)
| date = 2014-07-04 | access-date = 2014-07-07
| website = php.net
}}</ref> Functions may be defined inside code blocks, permitting a [[dynamic dispatch|run-time decision]] as to whether or not a function should be defined. There is a <code>function_exists</code> function that determines whether a function with a given name has already been defined. Function calls must use parentheses, with the exception of zero-argument class [[constructor (computer science)|constructor]] functions called with the PHP operator <code>new</code>, in which case parentheses are optional.{{Citation needed|date=November 2023}}
| url =
| title = create_function() (PHP manual)
| date =
| website = php.net
}}</ref>
| url =
| title = Anonymous functions (PHP manual)
| date = 2014-07-04 | access-date = 2014-07-07
| website = php.net
}}</ref>
| url = https://www.php.net/manual/en/functions.arrow.php
| title = Arrow Functions (PHP manual)
| access-date = 2021-01-25
| website = php.net
}}</ref>
<syntaxhighlight lang="php">
function getAdder($x) {
return
}
$adder = getAdder(8);
echo $adder(2); // prints "10"
</syntaxhighlight>
In the example above, <code>getAdder()</code> function creates a closure using passed argument {{code|lang=php|code=$x}}
| url = http://wiki.php.net/rfc/closures
| title = Request for Comments: Lambda functions and closures
Line 394 ⟶ 483:
}}</ref>
Unusually for a dynamically typed language, PHP supports type declarations on function parameters, which are enforced at runtime. This has been supported for classes and interfaces since PHP 5.0, for arrays since PHP 5.1, for "callables" since PHP 5.4, and scalar (integer, float, string and boolean) types since PHP 7.0.<ref name="
<syntaxhighlight lang="php">
function getAdder(int $x)
{
return
}
Line 411 ⟶ 497:
</syntaxhighlight>
By default, scalar type declarations follow weak typing principles. So, for example, if a parameter's type is <code>int</code>, PHP would allow not only integers, but also convertible numeric strings, floats or
=== PHP
Basic [[object-oriented programming]] functionality was added in PHP 3 and improved in PHP 4.<ref name="
PHP
If the developer creates a copy of an object using the reserved word <code>clone</code>, the Zend engine will check whether a <code>__clone()</code> method has been defined. If not, it will call a default <code>__clone()</code> which will copy the object's properties. If a <code>__clone()</code> method is defined, then it will be responsible for setting the necessary properties in the created object. For convenience, the engine will supply a function that imports the properties of the source object, so the programmer can start with a by-value [[wikt:replica|replica]] of the source object and only override properties that need to be changed.<ref>{{cite web|access-date=2008-03-16|url=
The [[Visibility (computer science)|visibility]] of PHP properties and methods is defined using the [[Keyword (computer programming)|keywords]] <code>public</code>, <code>private</code>, and <code>protected</code>. The default is public, if only [[variable (programming)|var]] is used; <code>var</code> is a synonym for <code>public</code>. Items declared <code>public</code> can be accessed everywhere. <code>protected</code> limits access to [[inherited class]]es (and to the class that defines the item). <code>private</code> limits visibility only to the class that defines the item.<ref>{{cite web |url=http://theserverpages.com/php/manual/en/language.oop5.visibility.php |title=Visibility (PHP Manual) |website=theserverpages.com |date=2005-05-19 |access-date=2010-08-26 |archive-date=2010-09-24 |archive-url=https://web.archive.org/web/20100924033414/http://theserverpages.com/php/manual/en/language.oop5.visibility.php |url-status=dead }}</ref> Objects of the same type have access to each other's private and protected members even though they are not the same instance.{{Citation needed|date=November 2023}}
==== Example ====
The following is a basic example of [[object-oriented programming]] in PHP 8:
<syntaxhighlight lang="php" line>
<?php
abstract class User
{
public function __construct(string $name)
{
// make first letter uppercase and the rest lowercase
$this->name = ucfirst(strtolower($name));
}
Line 444 ⟶ 534:
class Student extends User
{
public function __construct(string $name, private string $course
{
parent::__construct($name);
}
Line 460 ⟶ 547:
class Teacher extends User
{
public function __construct(string $name, private array $teachingCourses
{
parent::__construct($name);
}
Line 479 ⟶ 563:
new Student("Charlie", "Business Studies"),
];
$teachers = [
new Teacher("Dan", ["Computer Science", "Information Security"]),
new Teacher("Erin", ["Computer Science", "3D Graphics Programming"]),
new Teacher("Frankie", ["Online Marketing", "Business Studies", "E-commerce"]),
];
foreach ([$students, $teachers] as $users) {
echo $users[0]::class . "s:\n";
array_walk($users, function (User $user) {
echo "{$user->greet()}, {$user->job()}\n";
});
}
</syntaxhighlight>
This program outputs the following:
{{samp|Students:<br>
Hello, my name is Alice, I learn Computer Science<br>
Hello, my name is Bob, I learn Computer Science<br>
Hello, my name is Charlie, I learn Business Studies<br>
Teachers:<br>
Hello, my name is Dan, I teach Computer Science, Information Security<br>
Hello, my name is Erin, I teach Computer Science, 3D Graphics Programming<br>
Hello, my name is Frankie, I teach Online Marketing, Business Studies, E-commerce|style=padding-left:0px; overflow-x: hidden; word-wrap: break-word;}}
<!-- Note that there are problems with the script in this section. -->
== Implementations ==
The only complete PHP implementation is the original, known simply as PHP. It is the most widely used and is powered by the [[Zend Engine]]. To disambiguate it from other implementations, it is sometimes unofficially called "Zend PHP". The Zend Engine [[Compiler|compiles]] PHP [[source code]] on-the-fly into an internal format that it can execute, thus it works as an [[Interpreter (computing)|interpreter]].<ref>{{cite web|access-date=2009-11-04|url=http://www.linux-tutorial.info/modules.php?name=Howto&pagename=Unix-and-Internet-Fundamentals-HOWTO/languages.html|title=How do computer languages work?|archive-date=2011-07-16|archive-url=https://web.archive.org/web/20110716214917/http://www.linux-tutorial.info/modules.php?name=Howto&pagename=Unix-and-Internet-Fundamentals-HOWTO/languages.html|url-status=dead}}</ref><ref>{{cite book |title=Beginning PHP and MySQL 5: From Novice to Professional |author=Gilmore, W. Jason |page=[https://archive.org/details/beginningphpmysq0000gilm/page/43 43] |date=2006-01-23 |publisher=Apress |isbn=
PHP's single-request-per-script-execution model, and the fact that the Zend Engine is an interpreter, leads to inefficiency; as a result, various products have been developed to help improve PHP performance. In order to speed up execution time and not have to compile the PHP source code every time the web page is accessed, PHP scripts can also be deployed in the PHP engine's internal format by using an [[opcode]] cache, which works by [[Cache (computing)|caching]] the compiled form of a PHP script (opcodes) in [[Shared memory (interprocess communication)|shared memory]] to avoid the overhead of [[parsing]] and [[compiling]] the code every time the script runs. An opcode cache, [[Zend Opcache]], is built into PHP since version 5.5.<ref>{{cite web
| title = [VOTE] Integrating Zend Optimizer+ into the PHP distribution
| url = http://news.php.net/php.internals/66531
Line 521 ⟶ 604:
| access-date = 2013-09-21
| website = PHP.net
| archive-date = 2013-11-15
| archive-url = https://web.archive.org/web/20131115071936/http://php.net/manual/en/book.apc.php
| url-status = dead
}}</ref>
While Zend PHP is still the most popular implementation, several other implementations have been developed. Some of these are [[compiler]]s or support [[JIT compilation]], and hence offer performance benefits over Zend PHP at the expense of lacking full PHP compatibility.{{Citation needed|date=November 2023}} Alternative implementations include the following:
* [[HHVM]] (HipHop Virtual Machine) – developed at Facebook and available as open source, it converts PHP code into a high-level bytecode (commonly known as an [[intermediate language]]), which is then translated into x86-64 machine code dynamically at runtime by a [[Just-in-time compiler|just-in-time]] (JIT) compiler, resulting in up to 6× performance improvements.<ref>{{cite web|url=http://www.hhvm.com/blog/2813/we-are-the-98-5-and-the-16 |title=We are the 98.5% (and the 16%) « HipHop Virtual Machine |website=hhvm.com |date=December 2013 |access-date=2014-02-23}}</ref> However, since version 7.2 Zend has outperformed HHVM,<ref>{{Cite web|url=https://kinsta.com/blog/php-benchmarks/|title=The Definitive PHP 5.6, 7.0, 7.1, 7.2 & 7.3 Benchmarks (2019)|date=2019-01-14
** [[HipHop for PHP|HipHop]] – developed at Facebook and available as open source, it transforms the PHP scripts into [[C++]] code and then compiles the resulting code, reducing the server load up to 50%. In early 2013, Facebook deprecated it in favour of HHVM due to multiple reasons, including deployment difficulties and lack of support for the whole PHP language, including the <code>create_function()</code> and <code>eval()</code> constructs.<ref>{{cite web|title=Announcement on GitHub removing HPHPc support|website=[[GitHub]]|url=https://github.com/facebook/hiphop-php/commit/fc5b95110ff75110ad55bb97f7c93a8c4eb68e3b|access-date=2013-05-24}}</ref>
* [[Parrot virtual machine|Parrot]] – a virtual machine designed to run dynamic languages efficiently; the cross-translator Pipp transforms the PHP source code into the [[Parrot intermediate representation]], which is then translated into the Parrot's bytecode and executed by the virtual machine.
* [[PeachPie]] – a second-generation compiler to .[[.NET Framework|NET]] [[Common Intermediate Language]] (CIL) bytecode, built on the [[Roslyn (compiler)|Roslyn]] platform; successor of Phalanger, sharing several architectural components
* [[Phalanger (compiler)|Phalanger]] – compiles PHP into .Net Common Intermediate Language bytecode; predecessor of PeachPie
* [[Quercus (software)|Quercus]] – compiles PHP into [[Java bytecode]]
== Licensing ==
{{Main|PHP License}}
PHP is [[free software]] released under the [[PHP License]], which stipulates that:<ref>{{cite web|url=https://www.php.net/license/3_01.txt |title=The PHP License, version 3.01|access-date=2010-05-20}}</ref>
{{blockquote
| Products derived from this software may not be called "PHP", nor may "PHP" appear in their name, without prior written permission from group@php.net. You may indicate that your software works in conjunction with PHP by saying "[[Foo]] for PHP" instead of calling it "PHP Foo" or "phpfoo".
}}
This restriction on the use of "PHP" makes the PHP License incompatible with the [[GNU General Public License]] (GPL), while the Zend License is incompatible due to an advertising clause similar to that of the original [[BSD license]].<ref>{{cite web | title = GPL-Incompatible, Free Software Licenses | url = https://www.gnu.org/licenses/license-list.html#GPLIncompatibleLicenses | work = Various Licenses and Comments about Them | publisher = Free Software Foundation|access-date=2011-01-03}}</ref>
== <span id=PDO><span id=ZEPHIR>Development and community</span></span> ==
PHP includes various [[list of PHP libraries|free and open-source libraries]] in its source distribution
PHP allows developers to write [[Software extension|extensions]] in [[C (programming language)|C]] to add functionality to the PHP language. PHP extensions can be compiled statically into PHP or loaded dynamically at runtime. Numerous extensions have been written to add support for the [[Windows API]], process management on [[Unix-like]] [[operating system]]s, multibyte strings ([[Unicode]]), [[cURL]], and several popular [[archive format|compression formats]]. Other PHP features made available through extensions include integration with [[Internet Relay Chat
Some other projects, such as ''Zephir'', provide the ability for PHP extensions to be created in a high-level language and compiled into native PHP extensions. Such an approach, instead of writing PHP extensions directly in C, simplifies the development of extensions and reduces the time required for programming and testing.<ref>{{cite web
| url =
| title = Why Zephir?
| date = 2015-10-20 | access-date = 2015-12-14
Line 552 ⟶ 641:
}}</ref>
[[Zend Technologies]] provides a [[Zend Certified Engineer|PHP Certification]] based on PHP
== The PHP Foundation ==
{{Infobox organization
| formation = {{start date and age|2021|11|22}}
| logo = The PHP Foundation Logo.svg
| founder = [[Automattic]], [[Laravel]], Acquia, [[Zend (company)|Zend]], Private Packagist, [[Symfony]], Craft CMS, Tideways, [[PrestaShop]], [[JetBrains]]<ref>{{Cite web |last=Walker |first=James |date=2021-12-13 |title=What the New PHP Foundation Means for PHP's Future |url=https://www.howtogeek.com/devops/what-the-new-php-foundation-means-for-phps-future/ |access-date=2023-11-26 |website=How-To Geek |language=en}}</ref>
| website = https://thephp.foundation
}}
On 26 November 2021, the [[JetBrains]] blog announced the creation of The PHP Foundation, which will sponsor the design and development of PHP.<ref>{{Cite web |title=The New Life of PHP – The PHP Foundation {{!}} The PhpStorm Blog |url=https://blog.jetbrains.com/phpstorm/2021/11/the-php-foundation/ |access-date=2022-06-16 |website=The JetBrains Blog |date=22 November 2021 |language=en-US}}</ref>
{| class="wikitable"
!Year
![[Commit (version control)|Commits]]
![[Code review|Reviews]]
![[Request for Comments|RFCs]]
|-
!2022<ref>{{Cite web |title=The PHP Foundation: Impact and Transparency Report 2022 |url=https://thephp.foundation/blog/2022/11/22/transparency-and-impact-report-2022/ |access-date=2023-11-27 |website=thephp.foundation |language=en}}</ref>
|683
|283
|8
|-
!2023<ref>{{Cite web |last=Pronskiy |first=Roman |date=2024-02-26 |title=The PHP Foundation: Impact and Transparency Report 2023 |url=https://thephp.foundation/blog/2024/02/26/transparency-and-impact-report-2023/ |access-date=2024-04-01 |website=The PHP Foundation}}</ref>
|784
|702
|17
|-
!2024<ref>{{Cite web |last=Pronskiy |first=Roman |date=2025-03-31 |title=The PHP Foundation: Impact and Transparency Report 2023 |url=https://thephp.foundation/blog/2025/03/31/transparency-and-impact-report-2024// |access-date=2025-08-19 |website=The PHP Foundation}}</ref>
|1976
|1278
|13
|}
The foundation hires "Core Developers" to work on the PHP language's core repository. Roman Pronskiy, a member of the foundation's board, said that they aim to pay "market salaries" to developers.<ref>{{Cite news |last=Anderson |first=Tim |title=PHP Foundation formed to fund core developers |url=https://www.theregister.com/2021/11/23/php_foundation_formed_to_fund/ |access-date=2023-12-05 |website=www.theregister.com |language=en}}</ref>
The response to the foundation has mostly been positive, with the foundation being praised for better supporting the language and helping to stop the decrease in the language's popularity.<ref>{{Cite web |title=Programming languages: This old favourite is gaining popularity again |url=https://www.zdnet.com/article/programming-languages-this-old-favourite-is-gaining-popularity-again/ |access-date=2023-12-05 |website=ZDNET |language=en}}</ref><ref>{{Cite web |title=PHP 8.1 Released With Enums, Read-Only Properties and Fibers |url=https://www.i-programmer.info/news/98-languages/15050-php-81-released.html |access-date=2023-12-05 |website=www.i-programmer.info}}</ref> However, it has also been criticised for adding breaking changes to minor versions of PHP, such as in PHP 8.2 where initialising members of a class out-with the original class scope would cause deprecation errors,<ref>{{Cite web |title=It's time for the PHP Foundation to #StopBreakingPHP |url=https://trongate.io/news/display/TWN4GR/its-time-for-the-php-foundation-to-stopbreakingphp |access-date=2023-11-27 |website=trongate.io}}</ref> these changes impacted a number of open source projects including [[WordPress]].
<ref>{{Cite web |date=2023-11-16 |title=WordPress 6.4 PHP Compatibility |url=https://make.wordpress.org/hosting/2023/11/16/wordpress-6-4-php-compatibility/ |access-date=2023-11-27 |website=Make WordPress Hosting |language=en-US}}</ref>
Germany's [[Sovereign Tech Fund]] provided more than 200,000 Euros to support the PHP Foundation.<ref>{{Cite web |title=PHP |url=https://www.sovereigntechfund.de/tech/php |access-date=2024-05-26 |website=Sovereign Tech Fund |language=en}}</ref>
== <span id=PHPFPM>Installation and configuration</span> ==
[[File:PHP 7.1 - Example phpinfo() Screen.png|thumb|Example output of the phpinfo() function in PHP 7.1]]
There are two primary ways for adding support for PHP to a web server – as a native web server module, or as a CGI executable. PHP has a direct module interface called [[server application programming interface]] (SAPI), which is supported by many web servers including [[Apache HTTP Server]], [[Internet Information Services|Microsoft IIS]] and [[Oracle iPlanet Web Server|iPlanet Web Server]]. Some other web servers, such as OmniHTTPd, support the [[Internet Server Application Programming Interface]] (ISAPI), which is [[Microsoft]]'s web server module interface. If PHP has no module support for a web server, it can always be used as a [[Common Gateway Interface]] (CGI) or [[FastCGI]] processor; in that case, the web server is configured to use PHP's CGI executable to process all requests to PHP files.<ref name="php.net-4">{{cite web
| url = http://www.php.net/manual/en/install.general.php
| title = General Installation Considerations
Line 575 ⟶ 702:
}}</ref>
When using PHP for command-line scripting, a PHP [[command-line interface]] (CLI) executable is needed. PHP supports a CLI [[server application programming interface]] (SAPI)
| url = http://www.php.net/manual/en/features.commandline.introduction.php
| title = Command line usage: Introduction
| access-date = 2013-09-22
| website = php.net
| archive-date = 2021-03-21
| archive-url = https://web.archive.org/web/20210321035330/https://www.php.net/manual/en/features.commandline.introduction.php
| url-status = dead
}}</ref> The main focus of this SAPI is developing [[command line interface|shell]] applications using PHP. There are quite a few differences between the CLI SAPI and other SAPIs, although they do share many of the same behaviours.<ref>{{cite web
| url = http://www.php.net/manual/en/features.commandline.differences.php
| title = Command line usage: Differences to other SAPIs
Line 587 ⟶ 717:
}}</ref>
PHP has a direct module interface called SAPI for different web servers;<ref name="php.net-
|url = https://php.net/manual/en/install.general.php|title = General Installation Considerations|access-date = 2013-09-22|website = php.net}}</ref> in case of PHP 5 and Apache 2.0 on Windows, it is provided in form of a [[Dynamic-link library|DLL]] file called {{Mono|php5apache2.dll}},<ref>{{cite web|url = https://php.net/manual/en/install.windows.apache2.php|title = PHP: Apache 2.x on Microsoft Windows|access-date = 2013-09-22|website = php.net|url-status = dead|
There are different kinds of SAPIs for various web server extensions. For example, in addition to those listed above, other SAPIs for the PHP language include the
PHP can also be used for writing desktop [[graphical user interface]] (GUI) applications, by using the {{cite web
| url = https://github.com/cztomczak/phpdesktop | title = PHP Desktop | website = [[GitHub]] }} or discontinued [[PHP-GTK]] extension. PHP-GTK is not included in the official PHP distribution,<ref name=" | url = http://gtk.php.net/manual/en/tutorials.installation.php
| title = Installing PHP-GTK 2
| access-date = 2013-09-22
| website = php.net
| archive-date = 2013-12-12
| archive-url = https://web.archive.org/web/20131212093441/http://gtk.php.net/manual/en/tutorials.installation.php
| url-status = dead
}}</ref>
When PHP is installed and used in [[Cloud computing|cloud]] environments, [[software development kit]]s (SDKs) are provided for using cloud-specific features.{{Citation needed|date=November 2023}} For example:
* [[Amazon Web Services]] provides the AWS SDK for PHP<ref>{{cite web|url=http://aws.amazon.com/sdkforphp/ |title=AWS SDK for PHP |website=aws.amazon.com |access-date=2014-03-06}}</ref>
* [[
Numerous configuration options are supported, affecting both core PHP features and extensions.<ref>{{cite web
Line 632 ⟶ 768:
== Use ==
[[File:LAMP software bundle.svg|thumb|
PHP is a general-purpose scripting language that is especially suited to [[server-side scripting|server-side]] [[web development]], in which case PHP generally runs on a [[web server]]. Any PHP code in a requested file is [[execution (computing)|executed]] by the PHP runtime, usually to create [[dynamic web page]] content or dynamic images used on websites or elsewhere.<ref>{{cite web|url=https://php.net/manual/en/book.image.php |title=PHP Manual Image Processing and GD; |publisher= php.net |access-date=2011-04-09}}</ref> It can also be used for [[command-line]] scripting and [[client-side]] [[graphical user interface]] (GUI) applications. PHP can be deployed on most web servers, many [[operating system]]s and [[computing platform|platforms]], and can be used with many [[relational database management system]]s (RDBMS). Most [[web hosting]] providers support PHP for use by their clients. It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use.<ref name="
[[File:Scheme dynamic page en.svg|thumb|
Originally designed to create dynamic [[web page]]s, PHP now focuses mainly on [[server-side scripting]],<ref>{{cite web|url=http://webmaster.iu.edu/PHPlanguage/index.shtml|title=PHP Server-Side Scripting Language|publisher=[[Indiana University]]|access-date=2008-02-25|date=2007-04-04|archive-url=https://web.archive.org/web/20160121223739/http://webmaster.iu.edu/tools-and-guides/programming-languages/php.phtml|archive-date=2016-01-21}}</ref> and it is similar to other server-side scripting languages that provide dynamic content from a web server to a [[client (computing)|client]], such as [[Python (programming language)|Python]], [[Microsoft]]'s [[ASP.NET]], [[Sun Microsystems]]' [[JavaServer Pages]],<ref>{{cite web|url=http://java.sun.com/products/jsp/jspservlet.html|title=JavaServer Pages Technology — JavaServer Pages Comparing Methods for Server-Side Dynamic Content White Paper|publisher=Sun Microsystems|access-date=2008-02-25}}</ref> and <code>[[mod_perl]]</code><!-- do not remove the underscore from mod_perl: it is part of the name -->. PHP has also attracted the development of many [[software framework]]s that provide building blocks and a design structure to promote [[rapid application development]] (RAD).{{Citation needed|date=November 2023}} Some of these include [[PRADO (framework)|PRADO]], [[CakePHP]], [[Symfony]], [[CodeIgniter]], [[Laravel]], [[Yii Framework]], [[Phalcon (framework)|Phalcon]] and [[Laminas]], offering features similar to other [[web framework]]s.
The [[LAMP (software bundle)|LAMP architecture]] has become popular in the web industry as a way of deploying web applications.<ref>{{cite web|url=http://www.ibm.com/developerworks/library/os-5waystunelamp/index.html|title=Five simple ways to tune your LAMP application| website=[[IBM]] |date=2011-01-25}}</ref> PHP is commonly used as the ''P'' in this bundle alongside [[Linux]], [[Apache HTTP Server|Apache]] and [[MySQL]], although the ''P'' may also refer to [[Python (programming language)|Python]], [[Perl]], or some mix of the three. Similar packages, [[WAMP (software bundle)|WAMP]] and [[MAMP]], are also available for [[Microsoft Windows|Windows]] and [[macOS]], with the first letter standing for the respective operating system. Although both PHP and Apache are provided as part of the macOS base install, users of these packages seek a simpler installation mechanism that can be more easily kept up to date.{{Citation needed|date=November 2023}}
For specific and more advanced usage scenarios, PHP offers a well-defined and documented way for writing custom extensions in [[C (programming language)|C]] or [[C++]].<ref>{{cite web
| url = http://www.php.net/manual/en/internals2.structure.php
| title = PHP at the core: Extension structure
| access-date = 2013-09-22
| website = PHP.net
| archive-date = 2013-09-26
| archive-url = https://web.archive.org/web/20130926082102/http://www.php.net/manual/en/internals2.structure.php
| url-status = dead
}}</ref><ref>{{cite web
| url = http://www.php.net/manual/en/internals2.counter.php
Line 665 ⟶ 790:
| access-date = 2013-09-22
| website = PHP.net
| archive-date = 2013-09-26
| archive-url = https://web.archive.org/web/20130926082106/http://www.php.net/manual/en/internals2.counter.php
| url-status = dead
}}</ref><ref>{{cite web
| url = http://devzone.zend.com/303/extension-writing-part-i-introduction-to-php-and-zend/
Line 710 ⟶ 838:
| archive-date = 2013-09-20
| url-status = dead
}}</ref>{{Primary source inline|date=November 2023|reason=Since this is a broad generalization, secondary sources are required}} Besides extending the language itself in form of additional [[Library (computing)|libraries]], extensions are providing a way for improving execution speed where it is critical and there is room for improvements by using a true [[compiled language]].<ref>{{cite web
| url = https://stackoverflow.com/q/1110682
| title = Extending PHP with C++?
Line 720 ⟶ 848:
| access-date = 2013-09-22
| publisher = [[Stack Overflow]]
}}</ref> PHP also offers well
| title = Extending and Embedding PHP
| first = Sara | last = Golemon
| year = 2006
| publisher = Sams | isbn = 978-0-672-32704-9
}}</ref>
PHP received mixed reviews due to lacking support for [[Multithreading (software)|multithreading]] at the core language level,<ref>{{cite web
| url = https://bugs.php.net/bug.php?id=46919
| title =
| access-date = 2013-09-22
| website = PHP.net
Line 739 ⟶ 867:
}}</ref><ref>{{cite web|url=https://pecl.php.net/package/pthreads |title=PECL :: Package :: pthreads |website=pecl.php.net |access-date=2014-02-09}}</ref>
A command line interface, php-cli, and two [[ActiveX]] [[Windows Script Host]] scripting engines for PHP have been produced.{{Citation needed|date=November 2023}}
=== Popularity and usage statistics ===
PHP is used for [[Web content management system]]s including [[MediaWiki]],<ref>{{cite web|date=2010-01-25|title=Manual:Installation requirements#PHP|url=http://www.mediawiki.org/w/index.php?title=Manual:Installation_requirements&oldid=299556#PHP|access-date=2010-02-26|publisher=MediaWiki|quote=PHP is the programming language in which MediaWiki is written [...]}}</ref> [[WordPress]],<ref>{{cite web|title=About WordPress|url=http://wordpress.org/about/|access-date=2010-02-26|quote=WordPress was [...] built on PHP}}</ref> [[Joomla]],<ref>{{cite web|last=Kempkens|first=Alex|title=Joomla! — Content Management System to build websites & apps|url=http://www.joomla.org/about-joomla.html}}</ref> [[Drupal]],<ref>{{cite web|title=PHP and Drupal|date=16 September 2007|url=http://drupal.org/node/176052|access-date=2010-06-13|publisher=Drupal.org|archive-date=2010-02-08|archive-url=https://web.archive.org/web/20100208205523/http://drupal.org/node/176052|url-status=dead}}</ref> [[Moodle]],<ref>{{cite web|title=About|url=http://docs.moodle.org/en/About_Moodle|access-date=2009-12-20|publisher=Moodle.org|archive-date=2010-01-11|archive-url=https://web.archive.org/web/20100111055644/http://docs.moodle.org/en/About_Moodle|url-status=dead}}</ref> [[eZ Publish]], [[eZ Platform]], and [[SilverStripe]].<ref>{{cite web|title=Server requirements of SilverStripe|url=http://doc.silverstripe.org/framework/en/installation/server-requirements|url-status=dead|archive-url=https://web.archive.org/web/20141128063118/http://doc.silverstripe.org/framework/en/installation/server-requirements|archive-date=28 November 2014|access-date=13 October 2014|quote=SilverStripe requires PHP 5.3.2+}}</ref>
{{As of|2013|1}}, PHP was used in more than 240 million [[website]]s (39% of those sampled) and was installed on 2.1 million [[web server]]s.<ref>{{cite web | url=http://news.netcraft.com/archives/2013/01/31/php-just-grows-grows.html | title=PHP just grows & grows | date=2013-01-31 | access-date=2013-04-01 | author=Ide, Andy}}</ref>
{{As of|2025|05|21}} (six months after PHP 8.4's release), PHP is used as the server-side programming language on 74.2% of websites where the language could be determined; PHP 8 is the most used version of the language with 45.3% of websites using PHP being on that version, while 43.7% use PHP 7, 10.9% use PHP 5 and 0.1% use PHP 4.<ref name="W3Techs – World Wide Web Technology Surveys">{{cite web |title=Usage statistics of PHP for websites |url=https://w3techs.com/technologies/details/pl-php |website=W3Techs – World Wide Web Technology Surveys |publisher=W3Techs |access-date=21 May 2025}}</ref>
{{Stacked bar
|A1=45.3|T1=PHP 8<br />45.3%|C1=linear-gradient(to right, #66FF66 1.7%, #D4F4B4 14.7%, #FEF8C6 30.1%, #FFCC66, #FF7800); <!-- Please keep this color scheme for PHP 8: it reflects the actual and security of each branch -->
|A2=43.7|T2=PHP 7<br />43.7%|C2=linear-gradient(to right, #dc2626 74.3%, #ef4444, #f87171, #fca5a5, #fecaca);
|A3=10.9|T3=PHP 5<br />10.9%|C3=linear-gradient(to right, #075985 54.3%, #0369a1, #0284c7, #0ea5e9, #38bdf8, #7dd3fc, #bae6fd);
|A4=0.1|T4=PHP 4<br />0.1%|C4=#d4d4d4;
}}
{{Pie chart
|radius = 160
<!-- PHP version 8 (45.3%) -->
|value1 = 0.77 <!-- Formula: Version 8.4 is used by 1.7% of all the websites who use PHP version 8, so 45.3 / 100 * 1.7 = 0.77 -->
|label1 = PHP 8.4: 1.7% of PHP 8
|color1 = #66FF66 <!-- Please keep this color scheme for PHP 8: it reflects the actual and security of each branch -->
|value2 = 6.16 <!-- Formula: Version 8.3 is used by 13.6% of all the websites who use PHP version 8, so 45.3 / 100 * 13.6 = 6.16 -->
|label2 = PHP 8.3: 13.6% of PHP 8
|color2 = #D4F4B4 <!-- Please keep this color scheme for PHP 8: it reflects the actual and security of each branch -->
|value3 = 15.76
|label3 = PHP 8.2: 34.8% of PHP 8
|color3 = #FEF8C6 <!-- Please keep this color scheme for PHP 8: it reflects the actual and security of each branch -->
|value4 = 13.77
|label4 = PHP 8.1: 30.4% of PHP 8
|color4 = #FFCC66 <!-- Please keep this color scheme for PHP 8: it reflects the actual and security of each branch -->
|value5 = 8.88
|label5 = PHP 8.0: 19.6% of PHP 8
|color5 = #FF7800 <!-- Please keep this color scheme for PHP 8: it reflects the actual and security of each branch -->
<!-- PHP version 7 (47.3%) -->
|value6 = 32.47 <!-- Formula: Version 7.4 is used by 74.3% of all the websites who use PHP version 7, so 47.3 / 100 * 74.3 = 32.47 -->
|label6 = PHP 7.4: 74.3% of PHP 7
|color6 = #dc2626
|value7 = 4.59
|label7 = PHP 7.3: 10.5% of PHP 7
|color7 = #ef4444
|value8 = 3.54
|label8 = PHP 7.2: 8.10% of PHP 7
|color8 = #f87171
|value9 = 1.53
|label9 = PHP 7.1: 3.50% of PHP 7
|color9 = #fca5a5
|value10 = 1.53
|label10 = PHP 7.0: 3.50% of PHP 7
|color10 = #fecaca
<!-- PHP version 5 (10.9%) -->
|value11 = 5.9187
|label11 = PHP 5.6: 54.3% of PHP 5
|color11 = #075985
|value12 = 0.8720
|label12 = PHP 5.5: 8.00% of PHP 5
|color12 = #0369a1
|value13 = 1.6786
|label13 = PHP 5.4: 15.4% of PHP 5
|color13 = #0284c7
|value14 = 1.6350
|label14 = PHP 5.3: 15.0% of PHP 5
|color14 = #0ea5e9
|value15 = 0.7521
|label15 = PHP 5.2: 6.90% of PHP 5
|color15 = #38bdf8
|value16 = 0.0436
|label16 = PHP 5.1: 0.40% of PHP 5
|color16 = #7dd3fc
|value17 = 0
|label17 = PHP 5.0: less than 0.1% of PHP 5
|color17 = #bae6fd
<!-- PHP version 4 (0.1%) -->
|value18 = 0.0726
|label18 = PHP 4.4: 72.6% of PHP 4
|color18 = #525252
|value19 = 0.0234
|label19 = PHP 4.3: 23.4% of PHP 4
|color19 = #737373
|value20 = 0.0025
|label20 = PHP 4.2: 2.50% of PHP 4
|color20 = #a3a3a3
|value21 = 0.0008
|label21 = PHP 4.1: 0.80% of PHP 4
|color21 = #d4d4d4
|value22 = 0.0007
|label22 = PHP 4.0: 0.70% of PHP 4
|color22 = #e5e5e5
|caption = Usage share of PHP versions on 21 May 2025:<br /> six months after PHP 8.4's release<ref name="W3Techs – World Wide Web Technology Surveys" /><ref>{{Cite web|url=https://w3techs.com/technologies/details/pl-php/4|title=Usage Statistics and Market Share of PHP Version 4 for Websites, May 2025|website=w3techs.com}}</ref><ref name="w3techs.com">{{Cite web|url=https://w3techs.com/technologies/details/pl-php/5|title=Usage Statistics and Market Share of PHP Version 5 for Websites, May 2025|website=w3techs.com}}</ref><ref>{{Cite web|url=https://w3techs.com/technologies/details/pl-php/7|title=Usage Statistics and Market Share of PHP Version 7 for Websites, May 2025|website=w3techs.com}}</ref><ref>{{Cite web|url=https://w3techs.com/technologies/details/pl-php/8|title=Usage Statistics and Market Share of PHP Version 8 for Websites, May 2025|website=w3techs.com}}</ref>
}}
== <span id="REGISTER-GLOBALS">Security</span> ==
In
| url=http://www.coelho.net/php_cve.html
| title=PHP-related vulnerabilities on the National Vulnerability Database
| date=2012-07-05
| access-date=2013-04-01
| archive-date=2009-06-28
| archive-url=https://web.archive.org/web/20090628173101/http://www.coelho.net/php_cve.html
| url-status=dead
}}</ref> Recognizing that programmers make mistakes, some languages include [[taint checking]] to automatically detect the lack of [[data validation|input validation]] which induces many issues. Such a feature has been proposed for PHP in the past, but either been rejected or the proposal abandoned.<ref>{{cite web
| url=http://derickrethans.nl/files/meeting-notes.html#sand-boxing-or-taint-mode <!-- formerly at https://php.net/~derick/meeting-notes.html#sand-boxing-or-taint-mode -->
| title=Developer Meeting Notes, Nov. 2005}}</ref><ref>{{cite web
Line 757 ⟶ 995:
|title = Taint mode decision, November 2007
|url-status = dead
|
|
}}</ref><ref>{{Cite web|url=https://wiki.php.net/rfc/taint|title=PHP: rfc:taint|website=wiki.php.net}}</ref>
| title=Hardened-PHP Project
| url=http://www.hardened-php.net
Line 769 ⟶ 1,007:
| archive-date=2019-02-24
| url-status=dead
}}</ref> and Snuffleupagus<ref>{{cite web|title=Snuffleupagus Documentation|url=https://snuffleupagus.readthedocs.io/}}</ref> aim to remove or change dangerous parts of the language.
Historically, old versions of PHP had some configuration parameters and default values for such runtime settings that made some PHP applications prone to security issues. Among these, <code>[[magic quotes|magic_quotes_gpc]]</code> and <code>register_globals</code><ref name="
| url = https://php.net/manual/en/security.globals.php
| title = Security: Using Register Globals
| work = PHP Manual | access-date = 2013-09-22
| publisher = PHP.net
| archive-date = 2013-09-27
| archive-url = https://web.archive.org/web/20130927161000/http://php.net/manual/en/security.globals.php
| url-status = dead
}}</ref> configuration directives were the best known; the latter made any URL parameters become PHP variables, opening a path for serious security vulnerabilities by allowing an attacker to set the value of any uninitialized global variable and interfere with the execution of a PHP script. Support for "[[magic quotes]]" and "register globals" settings has been deprecated since PHP 5.3.0, and removed from PHP 5.4.0.<ref name="PHP Manual">{{cite web
| url = http://www.php.net/manual/en/security.magicquotes.php
| title = Magic Quotes
| work = PHP Manual | access-date = 2014-01-17
| publisher = PHP.net
| archive-date = 2014-02-08
| archive-url = https://web.archive.org/web/20140208000607/http://www.php.net/manual/en/security.magicquotes.php
| url-status = dead
}}</ref>
Line 789 ⟶ 1,035:
| access-date = 2014-02-13
| publisher = PHP.net
}}</ref> for the directory where uploaded files are stored; enabling it can result in the execution of malicious code embedded within the uploaded files.<ref>{{cite web
| url = http://devzone.zend.com/1008/php-security-exploit-with-gif-images/
| title = PHP Security Exploit With GIF Images
Line 808 ⟶ 1,054:
|access-date = 2013-09-22
|url-status = dead
|
|
}}</ref> The best practice is to either locate the image directory outside of the document root available to the web server and serve it via an intermediary script
Also, enabling the dynamic loading of PHP extensions (via <code>enable_dl</code> configuration directive)<ref>{{cite web
Line 830 ⟶ 1,076:
}}</ref>
Implied [[type conversion]]s that result in different values being treated as equal, sometimes against the programmer's intent, can lead to security issues. For example, the result of the comparison {{nowrap|1=<code>'0e1234' == '0'</code>}} is <code>true</code>, because strings that are
In a 2013 analysis of over 170,000 [[website defacement]]s, published by [[Zone-H]], the most frequently (53%) used technique was the exploitation of [[file inclusion vulnerability]], mostly related to insecure usage of the PHP
=== Cryptographic security ===
PHP includes <code>rand()</code><ref>{{cite web |title=PHP: Rand – Manual |url=https://php.net/rand}}</ref> and <code>mt_rand()</code> <ref>{{cite web |title=PHP: Mt_rand - Manual |url=https://php.net/mt_rand}}</ref> functions which use a [[pseudorandom number generator]], and are not cryptographically secure. As of version 8.1, the <code>random_int()</code> function is included, which uses a cryptographically secure source of randomness provided by the system.<ref>{{cite web | url=https://php.net/random_int | title=PHP: Random_int – Manual }}</ref>
There are two attacks that can be performed over PHP entropy sources: "seed attack" and "state recovery attack".{{Citation needed|date=November 2023}} As of 2012, a $250 [[Graphics processing unit|GPU]] can perform up to 2{{sup|30}} [[MD5]] calculations per second, while a $750 GPU can perform four times as many calculations at the same time.<ref>{{Cite web|url=https://www.usenix.org/conference/usenixsecurity12/technical-sessions/presentation/argyros|title=I Forgot Your Password: Randomness Attacks Against PHP Applications|website=usenix.org|publisher=[[USENIX]]|first1=George|last1=Argyros|first2=Aggelos|last2=Kiayias|date=10 August 2012|access-date=19 April 2024}}</ref> In combination with a "[[birthday attack]]" this can lead to serious security vulnerabilities.{{Citation needed|date=November 2023}}
=== Long-term support ===
The PHP development team provides official bug fixes for two years following release of each minor version followed by another two years where only security fixes are released.<!-- <ref name="PHP-2011" /> link to outdated RFC --><ref name="rfc-release-cycle-update">{{cite web | url=https://wiki.php.net/rfc/release_cycle_update | title=PHP: RFC:release_cycle_update }}</ref> After this, the release is considered [[Software release life cycle#End-of-life|end of life]] and no longer officially supported.
Extended long-term support beyond this is available from commercial providers, such as [[Zend (company)|Zend]] and others<ref>{{Cite web |title=PHP Support for PHP 7.2 – 8.0 {{!}} PHP LTS {{!}} Zend by Perforce |url=https://www.zend.com/services/php-long-term-support |access-date=2024-05-23}}</ref><ref>{{Cite web |title=Pagely PHP Long Term Support Page |url=https://pagely.com/solutions/php-long-term-support/ |access-date=2024-09-14 |website=Pagely |language=en-US}}</ref>
== See also ==
Line 839 ⟶ 1,095:
{{Div col|colwidth=25em}}
* [[Comparison of programming languages]]
* [[
* [[List of PHP accelerators]]
* [[List of PHP editors]]
* [[PEAR]] (PHP Extension and Application Repository)
* [[PHP accelerator]]
* [[Template processor]]
* [[XAMPP]] (
* [[Zend Server]]
{{div col end}}
== References ==
{{
{{Reflist}}
== Further reading ==
{{Spoken Wikipedia|En-PHP.ogg|date=2011-11-23}}
* {{cite journal |quote=What's the Absolute Minimum I Must Know About PHP? |url= https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/ |title=What is Code? |first=Paul |last=Ford |date=June 11, 2015 |journal=[[Bloomberg Businessweek]]}}
== External links ==
* {{Official website}}
{{Navboxes|list=
{{PHP}}
{{Web interfaces}}
{{Programming languages}}
{{FOSS}}
}}
{{Sister bar|wikt=no|commons=Category:PHP|v=Topic:PHP|n=no|q=no|s=no|b=PHP Programming|voy=no|mw=PHP}}
{{Authority control}}
[[Category:
[[Category:
[[Category:Free software programmed in C]]
[[Category:Articles with example PHP code]]
[[Category:Class-based programming languages]]
[[Category:Cross-platform software]]
Line 879 ⟶ 1,134:
[[Category:Dynamically typed programming languages]]
[[Category:Filename extensions]]
[[Category:Free
[[Category:High-level programming languages]]
[[Category:Internet terminology]]
[[Category:Object-oriented programming languages]]
[[Category:PHP software]]
[[Category:Procedural programming languages]]
[[Category:Programming languages]]
[[Category:Programming languages created in 1995]]
[[Category:Scripting languages]]
[[Category:Software using the PHP license]]
[[Category:Text-oriented programming languages]]
|