15
PHP 1 PHP This article is about the scripting language. For other uses, see PHP (disambiguation). PHP Paradigm(s) imperative, functional, object-oriented, procedural, reflective Designed by Rasmus Lerdorf Developer The PHP Group Appeared in 1995 Stable release 5.5.14 / June 27, 2014 Preview release 5.6.0RC2 / July 3, 2014 Typing discipline Dynamic, weak Major implementations Zend Engine, Phalanger, Quercus, Project Zero, HipHop, HHVM, Parrot Influenced by Perl, C, C++, Java, Tcl Influenced Hack Implementation language C OS Cross-platform License PHP License (most of Zend engine under Zend Engine License) Filename extension(s) .php, .phtml, .php4, .php3, .php5, .phps Website www.php.net [1] PHP Programming at Wikibooks PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. As of January 2013[2], PHP was installed on more than 240 million websites (39% of those sampled) and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1994, the reference implementation of PHP (powered by the Zend Engine) is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, which is a recursive acronym. [3] PHP code can be simply mixed with HTML code, or it can be used in combination with various templating engines and web frameworks. PHP code is usually processed by a PHP interpreter, which is usually implemented as a web server's native module or a Common Gateway Interface (CGI) executable. After the PHP code is interpreted and executed, the web server sends resulting output to its client, usually in form of a part of the generated web page for example, PHP code can generate a web page's HTML code, an image, or some other data. PHP has also evolved to include a command-line interface (CLI) capability and can be used in standalone graphical applications. PHP is free software released under the PHP License. PHP has been widely ported and can be deployed on most web servers on almost every operating system and platform, free of charge.

PHP in detail

Embed Size (px)

DESCRIPTION

A whole detail on php language and the web

Citation preview

Page 1: PHP in detail

PHP 1

PHPThis article is about the scripting language. For other uses, see PHP (disambiguation).

PHP

Paradigm(s) imperative, functional, object-oriented, procedural, reflective

Designed by Rasmus Lerdorf

Developer The PHP Group

Appeared in 1995

Stable release 5.5.14 / June 27, 2014

Preview release 5.6.0RC2 / July 3, 2014

Typing discipline Dynamic, weak

Major implementations Zend Engine, Phalanger, Quercus, Project Zero, HipHop, HHVM, Parrot

Influenced by Perl, C, C++, Java, Tcl

Influenced Hack

Implementation language C

OS Cross-platform

License PHP License (most of Zend engine under Zend Engine License)

Filename extension(s) .php, .phtml, .php4, .php3, .php5, .phps

Website www.php.net [1]

• PHP Programming at Wikibooks

PHP is a server-side scripting language designed for web development but also used as a general-purposeprogramming language. As of January 2013[2], PHP was installed on more than 240 million websites (39% of thosesampled) and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1994, the reference implementationof PHP (powered by the Zend Engine) is now produced by The PHP Group. While PHP originally stood forPersonal Home Page, it now stands for PHP: Hypertext Preprocessor, which is a recursive acronym.[3]

PHP code can be simply mixed with HTML code, or it can be used in combination with various templating enginesand web frameworks. PHP code is usually processed by a PHP interpreter, which is usually implemented as a webserver's native module or a Common Gateway Interface (CGI) executable. After the PHP code is interpreted andexecuted, the web server sends resulting output to its client, usually in form of a part of the generated web page – forexample, PHP code can generate a web page's HTML code, an image, or some other data. PHP has also evolved toinclude a command-line interface (CLI) capability and can be used in standalone graphical applications.PHP is free software released under the PHP License. PHP has been widely ported and can be deployed on most webservers on almost every operating system and platform, free of charge.

Page 2: PHP in detail

PHP 2

History

Rasmus Lerdorf, who wrote the original Common Gateway Interface (CGI) component, together with Andi Gutmansand Zeev Suraski, who rewrote the parser that formed PHP 3.PHP development began in 1994 when the developer Rasmus Lerdorf wrote a series of Common Gateway Interface(CGI) Perl scripts, which he used to maintain his personal homepage. The tools performed tasks such as displayinghis résumé and recording his web traffic. He rewrote these scripts in C for performance reasons, extending them toadd the ability to work with web forms and to communicate with databases, and called this implementation "PersonalHome Page/Forms Interpreter" or PHP/FI.PHP/FI could be used to build simple, dynamic web applications. Lerdorf initially announced the release of PHP/FIas "Personal Home Page Tools (PHP Tools) version 1.0" publicly to accelerate bug location and improve the code,on the Usenet discussion group comp.infosystems.www.authoring.cgi on June 8, 1995. This release already had thebasic functionality that PHP has as of 2013[2]. This included Perl-like variables, form handling, and the ability toembed HTML. The syntax resembled that of Perl but was simpler, more limited and less consistent.Early PHP was not intended to be a new programming language, and grew organically, with Lerdorf noting inretrospect: "I don’t know how to stop it, there was never any intent to write a programming language […] I haveabsolutely no idea how to write a programming language, I just kept adding the next logical step on the way."[4] Adevelopment team began to form and, after months of work and beta testing, officially released PHP/FI 2 inNovember 1997.One criticism of PHP is that it was not originally designed, but instead it was developed organically; among otherthings, this has led to inconsistent naming of functions and inconsistent ordering of their parameters. In some cases,the function names were chosen to match the lower-level libraries which PHP was "wrapping", while in some veryearly versions of PHP the length of the function names was used internally as a hash function, so names were chosento improve the distribution of hash values.Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed the base of PHP 3, changing the language'sname to the recursive acronym PHP: Hypertext Preprocessor. Afterwards, public testing of PHP 3 began, and theofficial launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing theZend Engine in 1999. They also founded Zend Technologies in Ramat Gan, Israel.

Page 3: PHP in detail

PHP 3

On May 22, 2000, PHP 4, powered by the Zend Engine 1.0, was released. As of August 2008 this branch reachedversion 4.4.9. PHP 4 is no longer under development nor will any security updates be released.On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II. PHP 5 included new features such asimproved support for object-oriented programming, the PHP Data Objects (PDO) extension (which defines alightweight and consistent interface for accessing databases), and numerous performance enhancements. In 2008PHP 5 became the only stable version under development. Late static binding had been missing from PHP and wasadded in version 5.3.Many high-profile open-source projects ceased to support PHP 4 in new code as of February 5, 2008, because of theGoPHP5 initiative, provided by a consortium of PHP developers promoting the transition from PHP 4 to PHP 5.PHP interpreters are available on most existing 32-bit and 64-bit operating systems, either by building them from thePHP source code, or by using pre-built binaries. For the PHP versions 5.3 and 5.4, the only available MicrosoftWindows binary distributions were 32-bit x86 builds, requiring Windows 32-bit compatibility mode while usingInternet Information Services (IIS) on a 64-bit Windows platform. PHP version 5.5 made the 64-bit x86-64 buildsavailable for Microsoft Windows.

PHP 6 and UnicodePHP received mixed reviews due to lacking native Unicode support at the core language level. In 2005, a projectheaded by Andrei Zmievski was initiated to bring native Unicode support throughout PHP, by embedding theInternational Components for Unicode (ICU) library, and representing text strings as UTF-16 internally. Since thiswould cause major changes both to the internals of the language and to user code, it was planned to release this asversion 6.0 of the language, along with other major features then in development.However, a shortage of developers who understood the necessary changes, and performance problems arising fromconversion to and from UTF-16, which is rarely used in a web context, led to delays in the project. As a result, aPHP 5.3 release was created in 2009, with many non-Unicode features back-ported from PHP 6, notablynamespaces. In March 2010, the project in its current form was officially abandoned, and a PHP 5.4 release wasprepared containing most remaining non-Unicode features from PHP 6, such as traits and closure re-binding. Initialhopes were that a new plan would be formed for Unicode integration, but as of 2014 none has been adopted.

PHPNGSince 20 January 2014, work has been underway on an experimental PHP branch named PHPNG (PHP NextGeneration), aimed at optimizing PHP performance by refactoring the Zend Engine while retaining near-completelanguage compatibility. As of 14 July 2014[2], the main benchmark suite for the PHPNG project, which WordPressis used for, shows an almost 100% increase in performance. PHPNG is intended to be the foundation of the nextmajor release of PHP, which is likely to be called PHP 6 or PHP 7, but the actual version name is not yet decided.

Release history

Page 4: PHP in detail

PHP 4

Key

Color Meaning Development

Red Old release No development

Yellow Stable release Security fixes

Green Stable release Bug and security fixes

Blue Future release New features

Version Releasedate

Supporteduntil

Notes

1.0 8 June1995

Officially called "Personal Home Page Tools (PHP Tools)". This is the first use of the name "PHP".

2.0 1November1997

3.0 6 June1998

20 October2000

Development moves from one person to multiple developers. Zeev Suraski and Andi Gutmans rewrite thebase for this version.

4.0 22 May2000

23 January2001

Added more advanced two-stage parse/execute tag-parsing system called the Zend engine.

4.1 10December2001

12 March2002

Introduced 'superglobals' ($_GET, $_POST, $_SESSION, etc.)

4.2 22 April2002

6 September2002

Disabled register_globals by default. Data received over the network is not inserted directly into theglobal namespace anymore, closing possible security holes in applications.

4.3 27December2002

31 March2005

Introduced the command-line interface (CLI), to supplement the CGI.

4.4 11 July2005

7 August2008

Fixed a memory corruption bug, which required breaking binary compatibility with extensions compiledagainst PHP version 4.3.x.

5.0 13 July2004

5 September2005

Zend Engine II with a new object model.

5.1 24November2005

24 August2006

Performance improvements with introduction of compiler variables in re-engineered PHP Engine. AddedPHP Data Objects (PDO) as a consistent interface for accessing databases.

5.2 2November2006

6 January2011

Enabled the filter extension by default. Native JSON support.

5.3 30 June2009

July 2014 Namespace support; late static bindings, Jump label (limited goto), Native closures, Native PHP archives(phar), garbage collection for circular references, improved Windows support, sqlite3, mysqlnd as areplacement for libmysql as underlying library for the extensions that work with MySQL, fileinfo as areplacement for mime_magic for better MIME support, the Internationalization extension, and deprecation ofereg extension.

5.4 1 March2012

1 March2015

Trait support, short array syntax support. Removed items: register_globals, safe_mode,allow_call_time_pass_reference, session_register(), session_unregister() andsession_is_registered(). Built-in web server. Several improvements to existing features,performance and reduced memory requirements.

5.5 20 June2013

20 June2016

Support for generators, finally blocks for exceptions handling, OpCache (based on Zend Optimizer+)bundled in official distribution.

Page 5: PHP in detail

PHP 5

5.6 No date set 3 years afterrelease

Constant scalar expressions, variadic functions, argument unpacking, new exponentiation operator,extensions of the use statement for functions and constants, new phpdbg debugger as a SAPI module,and other smaller improvements.

Beginning on June 28, 2011, the PHP Group began following a timeline for when new versions of PHP will bereleased. Under this timeline, at least one release should occur every month. Once per year, a minor release shouldoccur which can include new features. Every minor release should at least have 2 years of security and bug fixes,followed by at least 1 year of only security fixes, for a total of a 3 year release process for every minor release. Nonew features (unless small and self-contained) will be introduced into a minor release during the 3-year releaseprocess.

SyntaxMain article: PHP syntax and semanticsThe following Hello world program is written in PHP code embedded in an HTML document:

<!DOCTYPE html>

<html>

<head>

<title>PHP Test</title>

</head>

<body>

<?php echo '<p>Hello World</p>'; ?>

</body>

</html>

However, as PHP does not need to be embedded in HTML or used with a web server, the simplest version of a HelloWorld program can be written like this, with the closing tag omitted as preferred in files containing pure PHP code(prior to PHP 5.4.0, this short syntax for echo() only works with the short_open_tag configuration settingenabled, while for PHP 5.4.0 and later it is always available):

<?= 'Hello world';

The PHP interpreter only executes PHP code within its delimiters. Anything outside its delimiters is not processedby PHP (although non-PHP text is still subject to control structures described in PHP code). The most commondelimiters are <?php to open and ?> to close PHP sections. <script language="php"> and</script> delimiters are also available, as are the shortened forms <? or <?= (which is used to echo back astring or variable) and ?> as well as ASP-style short forms <% or <%= and %>. Short delimiters make script filesless portable, since support for them can be disabled in the local PHP configuration, and they are thereforediscouraged. The purpose of all these delimiters is to separate PHP code from non-PHP code, including HTML.The first form of delimiters, <?php and ?>, in XHTML and other XML documents, creates correctly formed XML"processing instructions". This means that the resulting mixture of PHP code and other markup in the server-side fileis itself well-formed XML.Variables are prefixed with a dollar symbol, and a type does not need to be specified in advance. PHP 5 introducedtype hinting that allows functions to force their parameters to be objects of a specific class, arrays, interfaces orcallback functions. However, type hints can not be used with scalar types such as integer or string.Unlike function and class names, variable names are case sensitive. Both double-quoted ("") and heredoc strings provide the ability to interpolate a variable's value into the string. PHP treats newlines as whitespace in the manner of a free-form language (except when inside string quotes), and statements are terminated by a semicolon. PHP has

Page 6: PHP in detail

PHP 6

three types of comment syntax: /* */ marks block and inline comments; // as well as # are used for one-linecomments. The echo statement is one of several facilities PHP provides to output text, e.g., to a web browser.In terms of keywords and language syntax, PHP is similar to most high level languages that follow the C stylesyntax. if conditions, for and while loops, and function returns are similar in syntax to languages such as C,C++, C#, Java and Perl.

Data typesPHP stores whole numbers in a platform-dependent range, either a 64-bit or 32-bit signed integer equivalent to theC-language long type. Unsigned integers are converted to signed values in certain situations; this behavior isdifferent from other programming languages. Integer variables can be assigned using decimal (positive andnegative), octal, hexadecimal, and binary notations.Floating point numbers are also stored in a platform-specific range. They can be specified using floating pointnotation, or two forms of scientific notation. PHP has a native Boolean type that is similar to the native Booleantypes in Java and C++. Using the Boolean type conversion rules, non-zero values are interpreted as true and zero asfalse, as in Perl and C++.The null data type represents a variable that has no value; NULL is the only allowed value for this data type.Variables of the "resource" type represent references to resources from external sources. These are typically createdby functions from a particular extension, and can only be processed by functions from the same extension; examplesinclude file, image, and database resources.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 hashes with both keys and values, and the two can be intermingled. PHPalso supports strings, which can be used with single quotes, double quotes, nowdoc or heredoc syntax.The Standard PHP Library (SPL) attempts to solve standard problems and implements efficient data accessinterfaces and classes.

FunctionsPHP has hundreds of functions provided by the core language functionality and thousands more available via variousextensions; these functions are well documented in the online PHP documentation. However, the built-in library hasa wide variety of naming conventions and associated inconsistencies, as described under history above.Additional functions can be defined by the developer:

function myAge($birthYear) //

defines a function, this one is named "myAge"

{

$yearsOld = date('Y') - $birthYear; //

calculates the age

return $yearsOld . ' year' . ($yearsOld != 1 ? 's' : ''); //

returns the age in a descriptive form

}

echo 'I am currently ' . myAge(1981) . ' old.'; //

outputs the text concatenated

//

with the return value of myAge()

// As the result of this syntax, myAge() is called.

// In 2014, the output of this sample program will be 'I am currently

Page 7: PHP in detail

PHP 7

33 years old.'

In PHP, normal functions are not first-class and can only be referenced by their name directly, or dynamically by avariable containing the name of the function (referred to as "variable functions"). User-defined functions can becreated at any time without being prototyped. Functions can be defined inside code blocks, permitting a run-timedecision as to whether or not a function should be defined. Function calls must use parentheses, with the exception ofzero-argument class constructor functions called with the PHP new operator, where parentheses are optional.Until PHP 5.3, support for true anonymous functions or closures did not exist in PHP. Whilecreate_function() exists since PHP 4.0.1, it is merely a thin wrapper around eval() that allows normalPHP functions to be created during program execution. Also, support for variable functions allows normal PHPfunctions to be used, for example, as callbacks or within function tables. PHP 5.3 added support for closures, whichare true anonymous, first-class functions, whose syntax can be seen in the following example:

function getAdder($x)

{

return function($y) use ($x)

{

return $x + $y;

};

}

$adder = getAdder(8);

echo $adder(2); // prints "10"

In the example above, getAdder() function creates a closure using passed argument $x (the keyword useimports a variable from the lexical context), which takes an additional argument $y, and returns the created closureto the caller. Such a function is a first-class object, meaning that it can be stored in a variable, passed as a parameterto other functions, etc.The goto flow control statement is used as in the following example:

function lock()

{

$file = fopen('file.txt', 'r+');

retry:

if (!flock($file, LOCK_EX | LOCK_NB))

goto retry;

fwrite($file, 'Success!');

fclose($file);

}

When flock() is called, PHP opens a file and tries to lock it. The target label retry: defines the point towhich execution should return if flock() is unsuccessful and goto retry; is called. The goto statement isrestricted and requires that the target label be in the same file and context.The goto statement has been supported since PHP 5.3.

Page 8: PHP in detail

PHP 8

ObjectsBasic object-oriented programming functionality was added in PHP 3 and improved in PHP 4. Object handling wascompletely rewritten for PHP 5, expanding the feature set and enhancing performance. In previous versions of PHP,objects were handled like value types. The drawback of this method was that the whole object was copied when avariable was assigned or passed as a parameter to a method. In the new approach, objects are referenced by handle,and not by value.PHP 5 introduced private and protected member variables and methods, along with abstract classes, final classes,abstract methods, and final methods. It also introduced a standard way of declaring constructors and destructors,similar to that of other object-oriented languages such as C++, and a standard exception handling model.Furthermore, PHP 5 added interfaces and allowed for multiple interfaces to be implemented. There are specialinterfaces that allow objects to interact with the runtime system. Objects implementing ArrayAccess can be usedwith array syntax and objects implementing Iterator or IteratorAggregate can be used with the foreach languageconstruct. There is no virtual table feature in the engine, so static variables are bound with a name instead of areference at compile time.If the developer creates a copy of an object using the reserved word clone, the Zend engine will check whether a__clone() method has been defined. If not, it will call a default __clone() which will copy the object'sproperties. If a __clone() method is defined, then it will be responsible for setting the necessary properties in thecreated object. For convenience, the engine will supply a function that imports the properties of the source object, sothe programmer can start with a by-value replica of the source object and only override properties that need to bechanged.The following is a basic example of object-oriented programming in PHP:

class Person

{

public $firstName;

public $lastName;

public function __construct($firstName, $lastName = '') { //

optional second argument

$this->firstName = $firstName;

$this->lastName = $lastName;

}

public function greet() {

return 'Hello, my name is ' . $this->firstName .

(($this->lastName != '') ? (' ' . $this->lastName) : '') .

'.';

}

public static function staticGreet($firstName, $lastName) {

return 'Hello, my name is ' . $firstName . ' ' . $lastName .

'.';

}

}

$he = new Person('John', 'Smith');

$she = new Person('Sally', 'Davis');

Page 9: PHP in detail

PHP 9

$other = new Person('iAmine');

echo $he->greet(); // prints "Hello, my name is John Smith."

echo '<br />';

echo $she->greet(); // prints "Hello, my name is Sally Davis."

echo '<br />';

echo $other->greet(); // prints "Hello, my name is iAmine."

echo '<br />';

echo Person::staticGreet('Jane', 'Doe'); // prints "Hello, my name is

Jane Doe."

The visibility of PHP properties and methods is defined using the keywords public, private, and protected.The default is public, if only var is used; var is a synonym for public. Items declared public can be accessedeverywhere. protected limits access to inherited classes (and to the class that defines the item). privatelimits visibility only to the class that defines the item. Objects of the same type have access to each other's privateand protected members even though they are not the same instance. PHP's member visibility features havesometimes been described as "highly useful." However, they have also sometimes been described as "at bestirrelevant and at worst positively harmful."

ImplementationsThe original, only complete and most widely used PHP implementation is powered by the Zend Engine and knownsimply as PHP. To disambiguate it from other implementations, it is sometimes referred to as "Zend PHP". The ZendEngine compiles PHP source code on-the-fly into an internal format that it can execute, thus it works as aninterpreter. It is also the "reference implementation" of PHP, as PHP has no formal specification, and so thesemantics of Zend PHP define the semantics of PHP itself. Due to the complex and nuanced semantics of PHP,defined by how Zend works, it is difficult for competing implementations to offer complete compatibility.PHP's single-request-per-script-execution model, and the fact the Zend Engine is an interpreter, lead to inefficiency.As a result, various products have been developed to help improve PHP performance. In order to speed up executiontime and not have to compile the PHP source code every time the web page is accessed, PHP scripts can also bedeployed in the PHP engine's internal format by using an opcode cache, which works by caching the compiled formof a PHP script (opcodes) in shared memory to avoid the overhead of parsing and compiling the code every time thescript runs. An opcode cache, Zend Opcache, is built into PHP since version 5.5. Another example of a widely usedopcode cache is the Alternative PHP Cache (APC), which is available as a PECL extension.While Zend PHP is still the most popular implementation, several other implementations have been developed. Someof these are compilers or support JIT compilation, and hence offer performance benefits over Zend PHP at theexpense of lacking full PHP compatibility. Alternative implementations include the following:• HipHop Virtual Machine (HHVM) – 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-64machine code dynamically at runtime by a just-in-time (JIT) compiler, resulting in up to 6× performanceimprovements.

• Parrot – a virtual machine designed to run dynamic languages efficiently; Pipp transforms the PHP source codeinto the Parrot intermediate representation, which is then translated into the Parrot's bytecode and executed by thevirtual machine.

• Phalanger – compiles PHP into Common Intermediate Language (CIL) bytecode

Page 10: PHP in detail

PHP 10

• HipHop – developed at Facebook and available as open source, it transforms the PHP scripts into C++ code andthen compiles the resulting code, reducing the server load up to 50%. In early 2013, Facebook deprecated it infavor of HHVM due to multiple reasons, including deployment difficulties and lack of support for the whole PHPlanguage, including the create_function() and eval() constructs.

LicensingPHP is free software released under the PHP License, which stipulates that:

Products derived from this software may not be called "PHP", nor may "PHP" appear in their name, withoutprior written permission from [email protected]. You may indicate that your software works in conjunction withPHP by saying "Foo for PHP" instead of calling it "PHP Foo" or "phpfoo".

This restriction on use of the name PHP makes it incompatible with the GNU General Public License (GPL).

Development and communityPHP includes free and open source libraries with the core build. PHP is a fundamentally Internet-aware system withmodules built in for accessing File Transfer Protocol (FTP) servers, many database servers, embedded SQL librariessuch as embedded PostgreSQL, MySQL, Microsoft SQL Server and SQLite, LDAP servers, and others. Manyfunctions familiar to C programmers such as those in the stdio family are available in the standard PHP build.PHP allows developers to write extensions in C to add functionality to the PHP language. PHP extensions can becompiled statically into PHP or loaded dynamically at runtime. Numerous extensions have been written to addsupport for the Windows API, process management on Unix-like operating systems, multibyte strings (Unicode),cURL, and several popular compression formats. Other PHP features made available through extensions includeintegration with IRC, dynamic generation of images and Adobe Flash content, PHP Data Objects (PDO) as anabstraction layer used for accessing databases,[5][6][7][8][9] and even speech synthesis. Some of the language's corefunctions, such as those dealing with strings and arrays, are also implemented as extensions.[10] The PHP ExtensionCommunity Library (PECL) project is a repository for extensions to the PHP language.Some other projects, such as Zephir, provide the ability for PHP extensions to be created in a high-level languageand 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.Zend Technologies provides a certification exam for programmers to become certified PHP developers.

Installation and configurationThere are two primary ways for adding support for PHP to a web server – as a native web server module, or as aCGI executable. PHP has a direct module interface called Server Application Programming Interface (SAPI), whichis supported by many web servers including Apache HTTP Server, Microsoft IIS, Netscape (now defunct) andiPlanet. Some other web servers, such as OmniHTTPd, support the Internet Server Application ProgrammingInterface (ISAPI), which is a Microsoft's web server module interface. If PHP has no module support for a webserver, it can always be used as a Common Gateway Interface (CGI) or FastCGI processor; in that case, the webserver is configured to use PHP's CGI executable to process all requests to PHP files.PHP-FPM (FastCGI Process Manager) is an alternative FastCGI implementation for PHP, bundled with the officialPHP distribution since version 5.3.3. When compared to the older FastCGI implementation, it contains someadditional features, mostly useful for heavily loaded web servers.When using PHP for command-line scripting, a PHP command-line interface (CLI) executable is needed. PHP supports a CLI SAPI as of PHP 4.3.0. The main focus of this SAPI is developing 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

Page 11: PHP in detail

PHP 11

behaviors.PHP can also be used for writing desktop graphical user interface (GUI) applications, by using the PHP-GTKextension. PHP-GTK is not included in the official PHP distribution, and as an extension it can be used only withPHP versions 5.1.0 and newer. The most common way of installing PHP-GTK is compiling it from the source code.When PHP is installed and used in cloud environments, software development kits (SDKs) are provided for usingcloud-specific features. For example:• Amazon Web Services provides the AWS SDK for PHP• Windows Azure can be used with the Windows Azure SDK for PHP.Numerous configuration options are supported, affecting both core PHP features and extensions. Configuration filephp.ini is searched for in different locations, depending on the way PHP is used. The configuration file is splitinto various sections, while some of the configuration options can be also set within the web server configuration.

Use

A broad overview of the LAMP software bundle, displayed here together with Squid.

PHP is a general-purpose scriptinglanguage that is especially suited toserver-side web development, in whichcase PHP generally runs on a webserver. Any PHP code in a requestedfile is executed by the PHP runtime,usually to create dynamic web pagecontent or dynamic images used onwebsites or elsewhere. It can also beused for command-line scripting andclient-side graphical user interface(GUI) applications. PHP can bedeployed on most web servers, manyoperating systems and platforms, andcan be used with many relational database management systems (RDBMS). Most web hosting providers supportPHP for use by their clients. It is available free of charge, and the PHP Group provides the complete source code forusers to build, customize and extend for their own use.

PHP acts primarily as a filter, taking input from a file or stream containing text and/or PHP instructions andoutputting another stream of data. Most commonly the output will be HTML, although it could be JSON, XML orbinary data such as image or audio formats. Since PHP 4, the PHP parser compiles input to produce bytecode forprocessing by the Zend Engine, giving improved performance over its interpreter predecessor.Originally designed to create dynamic web pages, PHP now focuses mainly on server-side scripting, and it is similarto other server-side scripting languages that provide dynamic content from a web server to a client, such asMicrosoft's ASP.NET, Sun Microsystems' JavaServer Pages, and mod_perl. PHP has also attracted thedevelopment of many software frameworks that provide building blocks and a design structure to promote rapidapplication development (RAD). Some of these include PRADO, CakePHP, Symfony, CodeIgniter, Laravel, YiiFramework, and Zend Framework, offering features similar to other web application frameworks.The LAMP architecture has become popular in the web industry as a way of deploying web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P may also refer to Python, Perl, or some mix of the three. Similar packages, WAMP and MAMP, are also available for Windows and OS X, with the first letter standing for the respective operating system. Although both PHP and Apache are provided as part of the Mac OS X base install, users of these packages seek a simpler installation mechanism that can be more

Page 12: PHP in detail

PHP 12

easily kept up to date.As of April 2007[2], over 20 million Internet domains had web services hosted on servers with PHP installed andmod_php was recorded as the most popular Apache HTTP Server module. As of October 2010[2], PHP was used asthe server-side programming language on 75% of all websites whose server-side programming language was known(as of February 2014[2], the percentage had reached 82%), and PHP was the most-used open source software withinenterprises. Web content management systems written in PHP include MediaWiki, Joomla, eZ Publish, SilverStripe,WordPress, Drupal, Moodle, the user-facing portion of Facebook, and Digg.For specific and more advanced usage scenarios, PHP offers a well defined and documented way for writing customextensions in C or C++. Besides extending the language itself in form of additional libraries, extensions areproviding a way for improving execution speed where it is critical and there is room for improvements by using atrue compiled language. PHP also offers well defined ways for embedding itself into other software projects. Thatway PHP can be easily used as an internal scripting language for another project, also providing tight interfacingwith the project's specific internal data structures.PHP received mixed reviews due to lacking support for multithreading at the core language level, though usingthreads is made possible by the "pthreads" PECL extension.

SecurityIn 2013, 9% of all vulnerabilities listed by the National Vulnerability Database were linked to PHP; historically,about 30% of all vulnerabilities listed since 1996 in this database are linked to PHP. Technical security flaws of thelanguage itself or of its core libraries are not frequent (22 in 2009, about 1% of the total although PHP applies toabout 20% of programs listed). Recognizing that programmers make mistakes, some languages include taintchecking to automatically detect the lack of input validation which induces many issues. Such a feature is beingdeveloped for PHP, but its inclusion into a release has been rejected several times in the past.There are advanced protection patches such as Suhosin and Hardening-Patch, especially designed for web hostingenvironments.There are certain language features and configuration parameters (primarily the default values for such runtimesettings) that make PHP prone to security issues. Among these, magic_quotes_gpc andregister_globals configuration directives are the best known; the latter made any URL parameters becomePHP variables, opening a path for serious security vulnerabilities by allowing an attacker to set the value of anyuninitialized global variable and interfere with the execution of a PHP script. Support for "magic quotes" and"register globals" has been deprecated as of PHP 5.3.0, and removed as of PHP 5.4.0.Another example for the runtime settings vulnerability comes from failing to disable PHP execution (via engineconfiguration directive) for the directory where uploaded images are stored; leaving the default settings can result inexecution of malicious PHP code embedded within the uploaded images. Also, leaving enabled the dynamic loadingof PHP extensions (via enable_dl configuration directive) in a shared web hosting environment can lead tosecurity issues.Also, implied type conversions that result in incompatible values being treated as identical against the programmer'sintent can lead to security issues. For example, the result of 0e1234 == 0 comparison will be true because thefirst compared value will be treated as scientific notation of a number (0×101234) with value of zero. This featureresulted in authentication vulnerabilities in Simple Machines Forum, Typo3 and phpBB when MD5 password hasheswere compared. Instead, identity operator (===) should be used; 0e1234 === 0 results in false.

Page 13: PHP in detail

PHP 13

References[1] http:/ / www. php. net[2] http:/ / en. wikipedia. org/ w/ index. php?title=PHP& action=edit[3] PHP Manual: Preface (http:/ / www. php. net/ manual/ en/ preface. php), www.php.net[4][4] , cited at[5] O'Reilly Networks - ONLamp (http:/ / www. onlamp. com/ pub/ a/ php/ 2004/ 08/ 05/ dataobjects. html)[6] IBM DeveloperWorks (http:/ / www-128. ibm. com/ developerworks/ db2/ library/ techarticle/ dm-0612xia/ )[7] IBM Redbooks (http:/ / www. redbooks. ibm. com/ abstracts/ sg247218. html)[8] php|architect (http:/ / www. phparch. com/ issue. php?mid=65)[9] Info (http:/ / www. infoworld. com/ article/ 05/ 10/ 19/ HNphpshow_1. html)[10] Cross Reference: /PHP_5_4/ext/standard/ (http:/ / lxr. php. net/ xref/ PHP_5_4/ ext/ standard/ )

External links• Official website (http:/ / www. php. net)• PHP (http:/ / www. dmoz. org/ Computers/ Programming/ Languages/ PHP) at DMOZ• PHP Reference Manual (http:/ / www. php. net/ manual)• PHP source code repository @ Github (https:/ / github. com/ php/ php-src)

Page 14: PHP in detail

Article Sources and Contributors 14

Article Sources and ContributorsPHP  Source: http://en.wikipedia.org/w/index.php?oldid=617459037  Contributors: -Barry-, -OOPSIE-, 0x6D667061, 16@r, 16x9, 194.78.109.xxx, 2006ict045, 2mcm, 50kalkiller, 83d40m, 8754865, 91weblessons, A930913, AKiwiDeerPin, Aaron Schulz, Aaron44126, Ab5602, Abcorn, Abelmebratu, Abhishek7737140453, Academic Challenger, Acdx, Adam1213, AdamRetchless, Adhall, Adjective Noun, AdmN, Adrian.benko, Aeons, Aetherfukz, Agentq314, Agorski, Agrado, Aharonyodaiken, Ahoerstemeier, Ahunt, Ajfweb, Ajvpot, Akhristov, AlReece45, Alai, Alainr345, Alan G. Archer, AlanUS, Alastair Haines, Aldie, Aleksd, Alerante, Alexbee2, Alexbonline1, Alias Flood, Alitokmen, Altaïr, Altenmann, Altonbr, Alvin-cs, Ambbes5, Amitverma, Amsfaithsoftware, Anabus, Andres, Andrewpmk, Andros 1337, Andy Dingley, AndyHassall, Andyiou52, Andyjsmith, Angel74dm, Anna Lincoln, Ansarka, Antandrus, AntiVanMan, Antilived, Antimatt, Antoin, Anton Sergeev, Antonym, Anttir717, Aowie1, Aparna mithun, Apparition11, Appy173, Apv, Arancaytar, Arash j13, Archer1974, Are you ready for IPv6?, Ario, Arjayay, Ashwanikr1981, Asirabm, Astronautics, Aswanii, Athox, Atlant, Atropos235, Aughtandzero, Austin512, Autarch, Autoride, Avenged Eightfold, Avinesh, Avk15gt, Avnit, Avochelm, Awk, AxelBoldt, Ayeshrajans, Az1568, B44H, BAxelrod, BBilge, BGOATDoughnut, Bachrach44, Bananastalktome, Banes, Bansal, BarkerJr, Barro, Battlestar27, Bbatsell, Bbtommy, Bdanchilla, Bdesham, Bdude, BeavisSanchez, Bedel23, Beefy, Beetstra, Beland, Beltranrubo, Benbread, Bender235, Bernd vdB, BethNaught, Bettymnz4, Bevo, BfMGH, Bhargavimoorthy, Bheesham, Bidsea, Big Brother 1984, BigBlueFish, Bige1977, Bitbit, Bitobor, BjKa, Blablablob, Black Falcon, Bleveret, Blinkms, Bloggocracy, Bloodshedder, Blueapples, Bluefoxicy, Boatman, Bobbfwed, Bobby122, Bobdc, Boinger, Bonadea, Bonatto, Bookofjude, Boothy443, Borislav Dopudja, Bornhj, BostonMA, Boulevardier, Bradcis, Bradml, Brandon, Bred85, Breno, Brian R Hunter, Brianski, Brick Thrower, Brion VIBBER, Brion.finlay, Brossow, Bruno Simões, Brusselsshrek, Bryan Derksen, Bugnot, Bunchosia, BurnDownBabylon, BurntSky, Burnte, BurtonReingold, Businessman332211, Buxtor, Buzgun, Bwfrank, Bwoebi, Bytebear, C.Fred, CONFIQ, CRGreathouse, Caiot, Caltas, Calvin 1998, Can't sleep, clown will eat me, Canderson7, CanisRufus, Canterbury Tail, CardinalDan, Cazort, Cbraga, Cburnett, Ceyockey, Cfjem, Cfust, Chaoszen, Chealer, Chicago2020, Chickenofgodsrectum, Chipp, Chocolateboy, Chorny, Chris 73, Chris Roy, Chris83, Chris98029, ChrisGualtieri, ChrisHodgesUK, ChrisLoosley, ChrisO, Chrislk02, Christopherwoods, Chuggnutt, Chun-hian, Chuuumus, Cic, Cjdyer, Cjmnyc, Cjxxi, Ckempo, Clabinger, Clintp, Closedmouth, Clsdennis2007, Cmelbye, Coalgames, Codename Lisa, Coderx, Coffee2theorems, CogentAgent, Coldkill, Colejohnson66, Cometstyles, Comp.arch, Compfreak7, Congregatio, Conny, Conscious, Conti, Conversion script, CorbinSimpson, Cornflake pirate, Corti, Courtarro, Craig Stuntz, Creek23, Crenner, Crum375, Csmaster2005, Css, Cst17, Cthackers, Ctz, Curb Safe Charmer, Curps, Cvinoth, Cwolfsheep, Cybercobra, Cyberhitesh, Cyberscribe, Cépey, D'oh!, DFRussia, DJ Creature, DN Lodge, DSchramm-NJITWILL, DStoykov, DVdm, Da404lewzer, DadaNeem, Daedricnekomata, Damotclese, Dan Atkinson, Dan scott, Dan100, Danakil, Dananderson, Danhuby, Danial.md5, Daniel15, Danim, Danolsen, Dany4762, Darguz Parsilvan, DarkAudit, DarkHorizon, Darkeldress, Darrien, Dasch, Dave Bell, Davejohnsan, David SIMMONS (HF), David mintz, David.Mestel, David.coallier, DavidCary, DavidLeighEllis, Davidds, Davide89v, Davidhorman, Davidjcmorris, Dcfleck, Dcoetzee, Dcooper, DeadEyeArrow, Decl, Decumanus, Deekay, Defsac, Dejvid, Delldot, Delpino, Deminy, Demonkoryu, Den fjättrade ankan, Dendodge, DennisWithem, Denpick, DerHexer, Dereckson, Derek R Bullamore, Dermodwood, DexDor, Dgies, Diberri, Diego Grez, Digitize, Digx, Dimo414, Dina, Diomidis Spinellis, Dionyziz, Diptanshu.D, Directorblue, Dirk gently, Dirkbb, Discospinster, Djun Kim, Dlotts, Dmwtechnologies, Dod1, Dolive21, Dolphinn, Donhalcon, Donho, Donner60, Donpayette, Doradus, Dori, Doru001, Dotxp, Doug Bell, Dpv, DrDentz, Draicone, Drant, Dreftymac, DrewSears, Drmies, Drupalnator, Dsimic, Dspradau, Duncan3dc, Duncharris, DunkleAura, Duperman01, Dwellings, Dwo, Dylan Lake, Déjà Vu, E is for Ian, ERcheck, ESkog, Eadz, EagleOne, Eagleal, Ed Cormany, Ed Love, Ed Poor, Edd9139, EditorE, Edmundlaujiahao, Edward, Edward Z. Yang, Eeekster, Ehheh, El C, ElBenevolente, Elivated.me, Eloquence, Elsom25, Elvinsh, Elyada, Emilhem, Emufarmers, Emwave, Emyr42, EnSkillet, Endotw3, Endrerud, Enkrates, Enyo, Epiphanius, Equinoxe, ErKURITA, Eric-Wester, EricJ, Ericamick, Erich gasboy, Erinaedu, Esanchez7587, Espoo, Espresso Addict, Esycat, Etimbo, Eugene Vasilchenko, Eurleif, EvenT, Everyking, Evice, Evildictaitor, Evilgohan2, Excirial, Exert, Exidor, Exonie, EyeRmonkey, F1tutorials, FQuist, FT2, Fabartus, Faisal.akeel, Faizan, Falcon8765, Falstart, Fama Clamosa, FatalError, Fdiv bug, Feezo, Fieldday-sunday, FiftyNine, Filceolaire, Finlay McWalter, Fireworking, Fixlinkfix, Flavgj, Flobi, Flowanda, Fluteflute, Flyer22, Foobar, Forderud, Fox Wilson, FrankTobia, Frap, Frecklefoot, Fred Bradstadt, Frederik S, Fredrik, Freerick, FreplySpang, Friedfish, Fsiler, Furrykef, Fvw, Fæ, GPHemsley, Gabrielepx, Gabrielwb, Gadfium, Gail, GamingG, Garas, Garazy, Gary, GaryLM, Garyzx, GastonRabbit, Gauss, Gawdl3y, Gdo01, Generalvorpil, George.Baldwin, GeorgeMoney, Gerbrant, Get4post, Ghettoblaster, Gianfranco, Giftlite, Gilgamesh, Gilliam, Gioware, Gisleburt, Glane23, Gmarsden, Gobonobo, Gogo Dodo, GoingBatty, Gokusandwich, Goldenshimmer, Goldom, Gopiraajvs, Gozika55l, Gpvos, GraemeL, Graham87, Graue, Green caterpillar, GregFD3S, Gregfitzy, GregorB, Gregoroq, Gronky, Guaka, Guanaco, Gudeldar, Guffydrawers, Guinness2702, Guppie, Gurch, Gurmeetdotinfo, Gutworth, Gutza, Guy Harris, Guy Macon, Gwalla, Haakon, Habbo sg, Hadal, Haikon, Halmstad, Halukakin, Hamamelis, Hamiltonstone, Hanumizzle, Happy-melon, Harsh 2580, Hazel666, Hcgtv, Helio cola, Helpersatan, Henke37, Henriquevicente, HenryLi, Hephaestos, Herbm, HereToHelp, Herorev, Hertz1888, Hiddenpearls, Hiftikhara, Hillel, Hjpotter92, Hmrox, Hnduy, Hoo man, HotXRock, Howcheng, Htmlland, Hu, Hu12, Huji, Hurmoth, Husky, Hyad, Hydrargyrum, Hydrogen Iodide, Hyst, I Use Dial, I already forgot, IByte, IMSoP, IRP, Ian Vaughan, Ianurag, Ianweller, Ikariamplayer, IllEATurHARTout, Iluvcapra, Imajes, Imkow.cn, Imroy, Imtikon, InShaneee, Indeyets, IndulgentReader, Indy, Intell 03, Intgr, IntrigueBlue, Irishguy, Iroken22, IronGargoyle, Irrawaddy, Isaac Dupree, Isarra (HG), Iscripts, Islam 3amr, Isnoop, Itai, Itpastorn, Ixfd64, J JMesserly, J.delanoy, J0rd1, JLaTondre, JVz, JYolkowski, Ja 62, JaGa, Jabberwoch, Jack Greenmaven, Jackfork, Jackohare, Jacob Myers, Jacobjohnward, Jadmadi, Jakub Vrána, Jallred6, JameiLei, James086, JamesMLane, Jamesday, Jammycakes, Jan304, Janadore, January, Jarble, Jasonlesliewright, Jasp, Jasper Deng, Jatin.gera08, Jatkins, Jaxl, Jaxsonjo, Jaymacdonald, Jaysponsored, Jazeemlk, Jcoconnor, Jdcompguy, Jed Smith, Jeff G., Jeff Song, Jeffrey Mall, Jemee012, Jeodesic, Jeremy Banks, Jeremy Visser, Jerome Charles Potts, Jeronimo, Jerryobject, JerzyTarasiuk, JesseHogan, JesterXXV, JetLover, Jewbacca, Jezmck, Jguard18, JhAgA, Jhonmary, Jigneshkprajapati, JimmE, Jj137, Jjdejong, Jobanjohn, Joe.dolivo, JohanJ93, John Broughton, John Cline, JohnBlackburne, JohnCarm, Johndrinkwater, Johnny 0, Johnnybpogi, Johnuniq, JonathonReinhart, Jondel, Jonesey95, Jonik, Jonlandrum, Jorge Stolfi, JorisvS, Jorunn, Joseph Solis in Australia, Joshua Issac, JoshuaZ, Josquius, Jpkoester1, Jspetrak, Jstastny, Judas, Julesd, Juliancolton, Juliano, JustinD, JustinHagstrom, Justpassin, Juves, Jvhertum, Jwestbrook, Jye182, K2cusat07, Kabaryder, Kalathalan, Kalinga, Kanishka 3000, Karam.Anthony.K, Karl-Henner, Karlward, Karthick rjkmr, Karthimuchlove, Kazakka, Kbrose, Kenguest, Kesla, Ketiltrout, Kexpert, Khalid hassani, Khlo, Kieran Waters2000, Kimachi, King Kovifor, King Lopez, Kingboyk, Kingpin13, Kirachinmoku, Kl4m, Kl4m-AWB, Klaser, Klilidiplomus, Kludger, Koavf, Koyaanis Qatsi, Kozuch, KramarDanIkabu, Kravietz, Krbrz, Krevan, Krinkle, Kristianlm, Kstarsinic, Kungfuadam, Kunoorthaker, KurtJ, Kusunose, Kvakaman, Kvdveer, Kwiki, Kyorosuke, LPCA, Laboramus, Larrymcp, Laspace, Lasse Havelund, Lathspell, Launchballer, Laura SIMMONS, Laurent Abbal, Lazybeam, Leafman, Leancode, LeaveSleaves, Legolas558, Lehieu008, LeinadSpoon, Leucille, LewisW, Lewisthemusician, Liangent, Lianmei, LibertyChick1776, Licuende, Lifefeed, Lightdarkness, Lights, Lil devil, Limajean34983, LinguistAtLarge, Linkspamremover, Liorkaplan, LittleDan, Livefmsonline, Lloydpick, Lollerskates, Lopifalko, LorenzoB, Lotje, Loudsox, LuckyInWaco, Lucy1981, Lugia2453, Luhshawnda, Lulu of the Lotus-Eaters, Luna Santin, Lupo, Lylylylylylylylyl, Lyoko is Cool, MC10, MCoding, MER-C, MONGO, MPerel, Mac, Magicsc, Magik.das, Magioladitis, Magister Mathematicae, Mailtosasidaran, Majkl578, Malleus Fatuorum, Man4mac, Mandarax, Mangst, Mani1, Manifestation, Mann jess, Map nil, MarcoDgz, Mariano.iglesias, Mark Tranchant, Markaci, Markdr, Martarius, Martinkunev, Martpol, Marx Gomes, Mashi12, Masonbarge, Materialscientist, Matt Schwartz, Matt.T, Matt.forestpath, MattDunbar, MattGiuca, MattTM, Matthewdingley, MauchoEagle, Mauriciofauth, Mblumber, McGeddon, Mcaruso, Mean as custard, Meekywiki, Meizawotmeiz, Melody Lavender, Menchi, Mentality, Menthaxpiperita, Mentifisto, Merlin-kb, Merovingian, Mets501, Mfb52, Mgdm, Mhavila, Mhkrebs, Michael A. White, Michael Hardy, Michaeldsuarez, Microtony, Mike Rosoft, Mike6271, Mikeblas, Mikerq, Milan Keršláger, Miles, MilesMi, Millermk, Milo03, MindlessXD, Mindmatrix, Minesweeper, Minghong, Minimac, Mirv, MisterCharlie, MisterLambda, Mitrandier, Mjs, Mjsabby, Mlemos, Mm40, Moeron, Moggie2002, Mohdelhi, Monkeyblue, Mortense, Mpritza, Mr.Z-man, MrJones, MrOllie, Mrbartjens, Mrh30, Mrwojo, Ms2ger, Mturner296, Muffuletta, Muntuwandi, Muro de Aguas, MusikAnimal, MutantMonkey, Mx3, Mxn, Myplacedk, Mysid, N!ghtfly, NCurse, NOrbeck, NSR, Nachother, Nagy, Nakon, Nakornban, Nanshu, Naseemkm, Naturespace, NauarchLysander, Nbarth, Nbettencourt, Nczempin, Nealmcb, Neatnate, Necenzurat, Neilshermer, Nelluq, Neoaries, NerdyScienceDude, Ngyikp, NicM, Nicholsr, NickGarvey, Nickj, Nigelj, Nigeljbee, Nightfly85, Nikai, Nikola Smolenski, Nilfanion, Ninavi, Nk, Nnp, Noble Story, Nohat, Noitanod, Noommos, NordLeuchte, Norm, Northamerica1000, Notbyworks, Notheruser, Notinasnaid, Nsevs, Nullw0rm, Numbo3, Nusaybah, Nx7000, Nylex, Nyttend, OMPIRE, OMouse, Oberiko, Obst2580, Ocaasi, Ochbad, Ocolon, Officerveets, Ofus, Ohnoitsjamie, Ohyoko, Oli Filth, Oliverkeenan, Omicronpersei8, Onehundredandtwo, Oneiros, OreXero, OsamaK, Oscarthecat, Osmond, Ossiemanners, Oxymoron83, Ozzyslovechild, P0lyglut, PAT or JK, PEAR, PHPedia, PL290, PWilkinson, Pako, Palmbeachguy, Panique, Parasane, Part Deux, Passengerpigeon, PatPatrson, Patelronak 28, Patrick, Patriotick, Patstuart, PaulGregory, Pavlovič, Pblag, Pcb21, Peet Likes Ska, Penubag, Perfecto, Persian Poet Gal, PeterSymonds, Peteravalos, Petrwiki, Pfortuny, Pgan002, PhantomS, Phil Boswell, PhilHibbs, Philip Hazelden, Philip Trueman, Philipolson, Philthecow, Philwiki, Phoenix-forgotten, Phosphorescence, Php5, Pianohacker, Pierre.bonnefoy, Piet Delport, Pinethicket, Pingpong123q, Pinkadelica, Pjrm, Pkatanov, Pkrecker, Pladask, Plasticup, PlatanusOccidentalis, Pmc, Pne, Pnm, Pocketissue, Pol098, Poor Yorick, PopUpPirate, Possum, Powerlord, Pradeepsomani, Prapsnot, PrathapMeister, Pratyeka, Primaryspace, Pritesh Gupta, Projectoxide, Prosopon, Psdie, PseudoOne, Pshent, Pvanrompay, Pyrecheios, Pyrocrickett, Pyrowolf, QVanillaQ, Qrc, Quadra23, Qufighter, Quiddity, Quilokos, Qwyrxian, R. fiend, R27182818, R3m0t, RA0808, RCX, RHaworth, RJaguar3, RPBCOMPUTECH, Rahidhidayat, Rahulbmg, Rahulsri9, Rahuval, RainbowOfLight, Rama, Ramir, Rawringtiger, Raysonho, Razican, Razorx, Rballou, Rcalvert, Rchandra, Rcrandallant, Reach Out to the Truth, Recognizance, RedLeaf81, RedWolf, RedWordSmith, Reedy, Regetch, Rehanyarkhan, Reisio, Renaissongsman, Renesis, Renka, Researchist, Retired user 0002, Retrozelda, RexNL, Rezaiqbal, Rezonansowy, Rgishri, Rhobite, Riana, Rich Farmbrough, Rich Janis, Rick Block, RickK, Riinamdar, Ringomassa, Rje, Rjwilmsi, Rl, Rlw, Rmogeraya, Rob.daemon, Rob1n, Robartin, Robchurch, Robert K S, RobertG, RobinMcM, Robust Physique, Rocket000, Rockfang, Rodri316, Rohanroshan, Roheim, Roland2, Roleplayer, Ronabop, Ronark, Ronnielbrown, Rooivos, Rory096, RossPatterson, Rowfilter, RoyBoy, Rparle, Rrjanbiah, Rror, Rsrikanth05, Rugops, RuneScapez, Russoedu, Ruud Koot, RyJones, Ryan Brodkin, RyanAHickman, Ryulong, S3000, SD5, SF007, SMcCandlish, SPACEBAR, Saimhe, Sajmure, Saltrange, Sam Sailor, Samisa.abeysinghe, Samwilson, Sander Marechal, Sander Säde, Sanfranman59, Sappy, Sasha Slutsker, SatuSuro, Savinder17, Scarpy, Schissel, Scipius, Scoates, Scohoust, ScotXW, SeanWDP, SebastianHelm, Sebleblanc, SeeConspira, Sergeant K, Serotonality, Sesse, Sgoguen, ShadowGuy, ShadowOfEclipse, Shadowjams, Shahnewazshamim, Shandris, Shanes, Sharcho, Sheeleyb, Shell Kinney, ShortBus, Shwaza, Shylika, Sich1234, Sid 3050, SigurdMagnusson, Silent.hackers, SimonP, Sirlemons, Skalman, SkyWalker, Sl, Slakr, Slon02, SlubGlub, Smith609, Smjg, Smtchahal, Snori, Snthdiueoa, Soapthgr8, Soc88, Soerfm, SoftwareDeveloper, SoftwareSimian, Sokari, Solarra, SolsticeDax, Solved009, SomeFajitaSomewhere, Somebenguy, Somebody in the WWW, Someslowly, Sonett72, Sonjaaa, Sopoforic, Sothun, Soulweaver, Spdaniel91, Speedboxer, SpeedyGonsales, Speedygonzales77, Spellbinder, Spiel, Spitfire, SpookyMulder, Spuug, SqueakBox, Sspecter, St.daniel, StanBrinkerhoff, Standardissue, StealthCopyEditor, Stefanmai, Stephantom, Stephen Deken, Stesch, Steve2011, StevenLewis, Stevenjgarner, Stevertigo, Stevietheman, Strangepics, Strongsauce, Stupid Corn, Stwalkerster, Subu690, Sugarfish, Sullivan Software Systems, Sun Creator, Sunny910910, Sunnyok, Sunnysood, Super3boy, Superbliss, Supernerd, SuzieDerkins, Svick, Swatwork, Sydius, SymlynX, Synook, Syphondu, Syrthiss, T0ny, TFOWR, TH-Foreigner, THEN WHO WAS PHONE?, TJFrazier, TJRC, Ta bu shi da yu, TakuyaMurata, Talkingpie, Tarquin, Tasc, Tdway, Tedickey, Tedivm, Template namespace initialisation script, Tentinator, Terfili, Terrible Tim, TerrorKalle, TerryE, Tessehamid, Text Rx, Texture, Tgeller, The Aviv, The Inedible Bulk, The Man in Question, The Nut, The Thing That Should Not Be, The Tom, The enemies of god, The4ngry, TheBilly, TheGeekHead, TheIntersect, TheRealFennShysa, Theboywhogotlost, Thegnark, Thetechgirl, Thewebdevv, Thomasmallen, Thore, Thue, Thumperward, Tianjiao, Tide rolls, Tiggerjay, Tigree, Tim Ivorson, Timneu22, Timrem, Titodutta, Tkbwik, Toadams, Tobias Bergemann, Toddcs, Toddinpal, Toddintr, TomCat4680, Tommy, TommyG, Tompagenet, Tony1, Tonyhayes, Top Sock Puppet, Torzsmokus, Tothwolf, Toussaint, Toveling, Trane Francks, Traroth, Tregoweth, Trendyhendy, Trevor MacInnis, TreyTateM, Trusilver, Trustable, Tryptofish, Tsepel Cory, Tsm32, Tstockma, Tudorol, Tulkolahten, Turgan, Turnerj, Turnstep, Tut21, Twigletmac,

Page 15: PHP in detail

Article Sources and Contributors 15

Two Bananas, Txt.file, Txuspe, Tychay, Tylaw, Typer85, UU, Udbhavah, Ugog Nizdast, Uncle G, UncleDouggie, Uncomplicated007, Unknown W. Brackets, Unreal128, Untitledmind72,Uranther, Urdutext, Uris, User24, Utcursch, UtherSRG, Uzume, VShaka, VX, Vague Rant, Val42, Valugi, Vameza, Vanished user ih3rjk324jdei2, Vanished user kjij32ro9j4tkse, Vasya, Veinor,Verminox, Versageek, Versus22, Verycuriousboy, Vicki Rosenzweig, Vicky191286, Vindicator26, Violetriga, Vishal K M, Visor, Vladkornea, Vrenator, Wackyvorlon, WalterGR, Wasted TimeR, Wdflake, Weathereye, WebDome, Wenz, Wesley, Weyes, Weylinp, Wez.p., Wgw2024, Whale plane, Who, Whpq, Wickorama, Widefox, Wik, WikHead, Wiki alf, WikiLaurent, Wikibofh,Wikitanvir, Wildhoney25, Willhsmit, Wilsonge, Wimg, Winterst, Wizardman, Wjgilmore, Wllm, Wonko, Woohookitty, Wootery, Writ Keeper, WriterHound, Wtshymanski, Wxop, Wykis,X-Fi6, XDanielx, Xantorohara, Xophorus, Xtremejames183, Xxpor, Yacoubean, Yamla, Yannick56, Yintan, Ynhockey, Yoghurt, YourEyesOnly, Yurik, Yywin, Zachlipton, Zae, Zantolak,Zawersh, Zaxx81, Zcahmed, Zenohockey, Zerbu, ZeroOne, Zeroasterisk, Zeus, ZimZalaBim, Zimbabwer, Zoe, Zoef1234, Zoicon5, Zondor, Zoonosis, Zootm, ZorkFox, Zotag, Zundark, Zvn,Zzuuzz, ^demon, Ævar Arnfjörð Bjarmason, Σ, 石, 3651 anonymous edits

Image Sources, Licenses and ContributorsFile:PHP-logo.svg  Source: http://en.wikipedia.org/w/index.php?title=File:PHP-logo.svg  License: Public Domain  Contributors: Biktora, Chealer, Pixewakb, 1 anonymous editsfile:Wikibooks-logo-en-noslogan.svg  Source: http://en.wikipedia.org/w/index.php?title=File:Wikibooks-logo-en-noslogan.svg  License: Creative Commons Attribution-Sharealike 3.0 Contributors: User:Bastique, User:Ramac et al.file:Rasmus Lerdorf cropped.jpg  Source: http://en.wikipedia.org/w/index.php?title=File:Rasmus_Lerdorf_cropped.jpg  License: Creative Commons Attribution-Sharealike 2.0  Contributors:Rasmus_Lerdorf_2003.jpg: Sebastian Bergmann ( Sebastian Bergmann @ Flickr) derivative work: Austin512 (talk)file:Andi Gutmans 1.jpg  Source: http://en.wikipedia.org/w/index.php?title=File:Andi_Gutmans_1.jpg  License: Creative Commons Attribution 2.0  Contributors: jim Winstead from los angeles,usafile:Zeev Suraski 2005 cropped.jpg  Source: http://en.wikipedia.org/w/index.php?title=File:Zeev_Suraski_2005_cropped.jpg  License: Creative Commons Attribution-Sharealike 2.0 Contributors: Zeev_Suraski_2005.jpg: Christophe Gesché ( Moosh Be @ Flickr) derivative work: Austin512 (talk)File:LAMP software bundle.svg  Source: http://en.wikipedia.org/w/index.php?title=File:LAMP_software_bundle.svg  License: Creative Commons Attribution-Sharealike 3.0  Contributors:User:ScotXW

LicenseCreative Commons Attribution-Share Alike 3.0//creativecommons.org/licenses/by-sa/3.0/