Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PHP
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 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="html"> <!--include /text/header.html--> <!--getenv HTTP_USER_AGENT--> <!--if substr $exec_result Mozilla--> Hey, you are using Netscape!<p> <!--endif--> <!--sql database select * from table where user='$username'--> <!--ifless $numentries 1--> Sorry, that record does not exist<p> <!--endif exit--> Welcome <!--$user-->!<p> You have <!--$index:0--> credits left in your account.<p> <!--include /text/footer.html--> </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>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)