PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. As of January 2013, 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 backronym.

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 the resulting output to its client, usually in the 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.

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 almost every operating system and platform, free of charge.

Despite its popularity, no written specification or standard existed for the PHP language until 2014, leaving the canonical PHP interpreter as a de facto standard. Since 2014, there is ongoing work on creating a formal PHP specification.

During the 2010s PHP as a platform has matured significantly, largely by influence from other software communities and projects such as Npm. In addition to standard library improvements, the work of PHP-FIG in the form of PSR-initiatives, Composer dependency manager and the Packagist repository have been a significant factor in this.

PHP 7 will be introducing a new technology called CURRY, which will make it easier to bridge between server side and front end by helping to convert PHP into CSS and JavaScript.

Early history

PHP development began in 1994 when Rasmus Lerdorf wrote a series of Common Gateway Interface (CGI) binaries in C, which he used to maintain his personal homepage. He extended them to add the ability to work with web forms and to communicate with databases, and called this implementation "Personal Home Page/Forms Interpreter" or PHP/FI.

PHP/FI could be used to build simple, dynamic web applications. Lerdorf initially announced the release of PHP/FI as "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 the basic functionality that PHP has as of 2013. This included Perl-like variables, form handling, and the ability to embed 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 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." A development team began to form and, after months of work and beta testing, officially released PHP/FI 2 in November 1997.

One criticism of PHP is that it was not originally designed, but instead it was developed organically; among other things, 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 very early versions of PHP the length of the function names was used internally as a hash function, so names were chosen to improve the distribution of hash values.

PHP 3 and 4

Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive acronym PHP: Hypertext Preprocessor. Afterwards, public testing of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999. They also founded Zend Technologies in Ramat Gan, Israel.

On May 22, 2000, PHP 4, powered by the Zend Engine 1.0, was released. As of August 2008 this branch reached version 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 as improved support for object-oriented programming, the PHP Data Objects (PDO) extension (which defines a lightweight and consistent interface for accessing databases), and numerous performance enhancements. In 2008 PHP 5 became the only stable version under development. Late static binding had been missing from PHP and was added 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 the GoPHP5 initiative, provided by a consortium of PHP developers promoting the transition from PHP 4 to PHP 5.

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, or by using pre-built binaries. For the PHP versions 5.3 and 5.4, the only available Microsoft Windows binary distributions were 32-bit x86 builds, 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.

PHP 6 and Unicode

PHP received mixed reviews due to lacking native Unicode support at the core language level. In 2005, a project headed by Andrei Zmievski was initiated to bring native Unicode support throughout PHP, by embedding the International Components for Unicode (ICU) library, and representing text strings as UTF-16 internally. Since this would cause major changes both to the internals of the language and to user code, it was planned to release this as version 6.0 of the language, along with other major features then in development.

However, a shortage of developers who understood the necessary changes, and performance problems arising from conversion to and from UTF-16, which is rarely used in a web context, led to delays in the project. As a result, a PHP 5.3 release was created in 2009, 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 containing most remaining non-Unicode features from PHP 6, such as traits and closure re-binding. Initial hopes were that a new plan would be formed for Unicode integration, but as of 2014 none has been adopted.


As of 2015, work is underway on a new major PHP version named PHP 7. There was some dispute as to whether the next major version of PHP was to be called PHP 6 or PHP 7. While the PHP 6 Unicode experiment had never been released, a number of articles and book titles referenced the old PHP 6 name, which might have caused confusion if a new release were to reuse the PHP 6 name. After a vote, the name PHP 7 was chosen.

PHP 7 gets its foundations from an experimental PHP branch that was originally named phpng (PHP next generation), which aims at optimizing PHP performance by refactoring the Zend Engine while retaining near-complete language compatibility. As of 14 July 2014, WordPress-based benchmarks, which serve as the main benchmark suite for the phpng project, show an almost 100% increase in performance. Changes from phpng are also expected to make it easier to improve performance in the future, as more compact data structures and other changes are seen as better suited for a successful migration to a just-in-time (JIT) compiler. Because of the significant changes, this reworked Zend Engine will be called Zend Engine 3, succeeding the Zend Engine 2 used in PHP 5.

Because of phpng's major internal changes, it would have to go into a new major version of PHP, rather than a minor 5.x release, according to PHP's release process, thus spawning PHP 7. Major versions of PHP are allowed to break code backwards-compatibility, and so PHP 7 presented an opportunity to make other improvements beyond phpng that require backwards-compatibility breaks. In particular, the following backwards-compatibility breaks were made:

Many "fatal" or "recoverable"-level legacy PHP "errors" were replaced with modern object-oriented exceptions

The syntax for variable dereferencing was reworked to be more internally consistent and complete, allowing the use of ->, [], (), {}, and :: operators with arbitrary meaningful left-hand-side expressions

Support for legacy PHP 4-style constructor methods was deprecated

The behaviour of the foreach statement was changed to be more predictable

Constructors for the few classes built-in to PHP which returned null upon failure were changed to throw an exception instead, for consistency

Several unmaintained or deprecated SAPIs and extensions were removed from the PHP core, most notably the legacy mysql extension

The behaviour of the list() operator was changed to remove support for strings

Support for legacy ASP-style PHP code delimeters was removed

An oversight allowing a switch statement to have multiple default clauses was fixed

Support for hexadecimal number support in some implicit conversions from strings to number types was removed

The left-shift and right-shift operators were changed to behave more consistently across platforms

Conversions between integers and floating point numbers were tightened and made more consistent across platforms

PHP 7 will also include new language features. Most notably, it will introduce return type declarations, which will complement its existing parameter type declarations, and support for the scalar types (integer, float, string and boolean) in parameter and return type declarations.

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


The mascot of the PHP project is the elePHPant, a blue elephant with the PHP logo on its side, designed by Vincent Pontier. The elePHPant is sometimes differently colored when in plush toy form.

MySQL is an open-source relational database management system (RDBMS) in July 2013, it was the world's second most widely used RDBMS, and the most widely used open-source client–server RDBMS. It is named after co-founder Michael Widenius's daughter, My. The SQL acronym stands for Structured Query Language. The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL was owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Oracle Corporation. For proprietary use, several paid editions are available, and offer additional functionality.

MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack (and other "AMP" stacks). LAMP is an acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects that require a full-featured database management system often use MySQL. Applications that use the MySQL database include: TYPO3, MODx, Joomla, WordPress, phpBB, MyBB, Drupal and other software. MySQL is also used in many high-profile, large-scale websites, including Google (though not for searches), Facebook, Twitter, Flickr, and YouTube.

On all platforms except Windows, MySQL ships with no GUI tools to administer MySQL databases or manage data contained within the databases. Users may use the included command line tools, or install MySQL Workbench via a separate download. Many third party GUI tools are also available.

PHP Course Content in Details:

Introduction to PHP:

From c/c++ programming to PHP programming

PHP Introduction

PHP Inventions and Versions

PHP with other other technologies

Scope of PHP

PHP in LAMP Programming and Open Source Programming

How PHP work with frontend and backend

Applications which can be created using PHP

XAMPP , WAMP and MAMP server installation on operating system like

window xp , window 7 , ubuntu (linux operating system)

( IDE )Editors for writing PHP code based on operating system

PHP History and Founder of PHP and regarding Zend Company

Other Dynamic Scripting Languages comparison ( Like ASP , PHP , JSP , Perl etc… )

Important tools and software require ( like Editors , Web Server , Database , Important libraries etc

Understand the importance php.ini file and httpd.conf file during apache , mysql and php installation

Understand the basic of root folder ( htdocs or www ) from php.ini file and how to tune it.

Configure Port number while running mysql and apache in php.ini file

Know the basics of Linux command to run LAMP on linux platform

Install procedure of LAMP on Windows and Linux

Run Xampp , Lamp or Mamp Software on different operating system

PHP Basics Syntax

PHP Opening and Closing Tags

PHP Shorthand Tags

PHP echo tag for printing

PHP print tag for printing

Difference Between echo and print

PHP with command line and batch file

PHP Debugging Steps

PHP Headers and HTTP redirects

Types of errors in PHP with examples

PHP Documentation for further study

Important website to know PHP examples , MySQL Queries , Html syntax , Css tips , Jquery plugin development concept , Javascript inbuilt Objects and syntax etc…

PHP Variables , Global Array and Expression :

Types of data in PHP : integers , stringd , floating data , booleans , arrays etc..

PHP constant and variables

Difference between PHP variables and constant with example

Imporatnt Rules for declaring PHP variables

PHP variable size in terms of characters

Heredoc in PHP to store large data

difference between define() function and variables

PHP strings

User-defined Constants

String constants, variable interpolation into strings

HTTP environment variables

Magic Constants

PHP Global arrays ( $_SERVER , $_POST , $_GET , $_POST , $_REQUEST , $_SESSION , $_COOKIE )

PHP Operators

PHP Arithmetic Operators

PHP Assignment Operators

PHP Incrementing/Decrementing Operators

PHP Relational (Comparison) Operators

PHP Logical Operators

PHP Array Operators

PHP Bitwise Operators

PHP Error Suppression Operator

PHP Ternary Operator

PHP Default Operator

PHP Associative Operator

PHP MOD Operator

PHP Operator Precedence and Associativity

PHP Conditional Events and Switch case

PHP IF Condition with optional Else

PHP IF and Else with condition and example

PHP multiple IF with else condition

TRUE and FALSE test with If Condition

PHP Nested IF and Else Condition

PHP Nested IF Mod Operator

PHP IF condition with Ternary Operator

Identify Odd and Even no with IF and Else

Flow Diagram for Nested IF and simple IF condition

Alternative for Nested IF

PHP Switch case in replacement of Nested IF

Default case in Switch Case

PHP Flow Control and Loops :

PHP while Loop

PHP For Loop

PHP Do While Loop

PHP Goto

PHP Break keyword

PHP Continue keyword

PHP exit keyword

Types of Error in PHP :

Understand the Basic syntax and Parse error

Know the different Notice error in PHP

Warning errors in PHP

Fatal error in PHP

Difference Between fatal error and warning with example

How to solve errors with debugging concept in PHP

How to minimize errors while writing code

Some Important tips to get resolved PHP Errors

Understand error_reporting in php.ini file

Difference between include() function and include_once() function

Difference between require() function and require_once() function

Difference between include() and require() function

PHP Function , PHP Function with Argument :

Understand what is function

Need of Function in PHP

Advantage of Function over statements

PHP Function declaration with Example

PHP Function Calling

PHP Function with arguments

Default Arguments in Function

Types of arguments in Function

Function argument with call by value

Function argument with call by reference

Function with Return keyword

Scope of Function Global and Local

Recursive Function

Types of Function ( e.g. Static Function )

PHP Array , Types of Array , Foreach Loop

Understand the need of Array

Difference between Array and Variables

How to define an Array and when to use

What is an index in array

How to store value in array using index

How and when to use arrays

Indexing arrays, numeric and hashes

How to intialize an Array

Print array using print_r() Function

Difference between echo and print_r() Function

Associative Operator in Array ( => )

Numeric Array in PHP

Associative Array in PHP

Mixed Array in PHP

One -Dimensional Array

Multi-Dimensional Array

Extract Array value using index

Extract array value using count() function with While loop , For loop

What is Foreach loop in PHP ?

Extract Array using Foreach loop

Foreach loop with key and without key definition

One-dimensional arrays

Multi-dimensional arrays

PHP String Manipulation and Regular Expression

Types of characters during user input

How to handle single quote ( ‘ ) and double quote ( ” )

String function like substr() to extract certain characters

Use of trim() function to avoid trailing spaces and leading spaces

strtolower() and strtoupper() function for string case conversion

Format output using printf() , sprintf() function

Use of addslashes() and stripslashes() function to handle sensitive characters like quotes

extract tags from given string using strip_tags() function

What is Regular expression in PHP ?

Use and advantage of regular expression over inbuilt function

^ symbol in regular expression

[ ] symbol ( types of character) in regular expression

{ } symbol ( range of character) in regular expression

+ , \ , ? and many more special characters with example in regular expression

Create a function for only alphabets validation using regular expression

Create a function for alphanumeric validation using regular expression

Create a function for only numeric validation using regular expression

Create a function for emailid validation using regular expression

Create a function for username validation using regular expression

Create a function for IP validation using regular expression

Create a function for URL validation using regular expression

Create a function for strong password validation using regular expression

Use of preg_match() function in regular expression

Use of preg_replace() function in regular expression

Use of preg_split() function in regular expression