Skip to main content

PHP is an open-source server-side scripting language widely used in web development. Use this tag for questions about PHP functions, syntax and use.

PHP: Hypertext Preprocessor is a widely used, general-purpose server side scripting language that is especially suited for web development. The latest stable release, development changes, and development branches can be found on the PHP website.

See the UPGRADING and UPGRADING.INTERNALS files for release migration instructions.

From Wikipedia:

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP is now installed on more than 20 million websites and 1 million web servers. Originally created by Rasmus Lerdorf in 1995, the reference implementation of PHP is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it is now said to stand for PHP: Hypertext Preprocessor, a recursive acronym.

PHP code is interpreted by a web server with a PHP processor module which generates the resulting web page: PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data. It has also evolved to include a command-line interface capability and can be used in standalone graphical applications.


PHP has many active community forums, including:

More information

Online documentation

The PHP manual is the official documentation for the language syntax, featuring function search and URL shortcuts (for example The API is well documented for native and additional extensions. Most additional extensions can be found in PECL. The PEAR repository contains a plethora of community supplied classes.

PHP Tutorials

Free PHP Programming Books

Best PHP Books 2012

Database support

PHP supports a wide range of databases, relational and non-relational alike.

PHP is often paired with the MySQL relational database. PHP also includes great database support for PostgreSQL, SQLite, Microsoft SQL Server (API reference), Oracle, IBM DB2 & Cloudscape, Apache Derby and even ODBC.

All modern versions of PHP include PDO, a built-in data-access abstraction library with comprehensive connectivity options. More recently, PECL extensions have surfaced that offer "NoSQL" database support, including Apache Thrift (for Apache Cassandra), MongoDB, Redis, and others.

Useful Third-party Code and Tools

In addition to the vast functionality provided in the PHP Core and through PEAR and PECL, there are a number of noteworthy 3rd party contributions to the PHP world, some of which are listed below.


PHP has a variety of object-oriented web application frameworks that provide a lot of the common functionality required to build modern web application out of the box, with the more well-known being (in alphabetical order) the following ones:

Object-Relational Mapping

Object relational Maps try to solve or mitigate the object-relational impedance mismatch problem by transparently mapping between table structures in a database and business objects in an application. The more prominent ORMs in the PHP world are (in alphabetical order):

Code Language (used for syntax highlighting): lang-php