Nepedia
Back to Discover
Advanced Reader
💻

PHP

technology Maturity 7-9 war conflict Next article →

This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

PHP is a general-purpose scripting language designed primarily for web development. A scripting language is a set of instructions that a computer follows to perform specific tasks. While PHP is mostly used to build websites, it can also be used for programming tasks outside of the web context.

Webysther 20160423 - Elephpant
Webysther 20160423 - Elephpant

Today, the official reference implementation of PHP is managed by the PHP Group. It is free software released under the PHP License, meaning it can be deployed on almost any operating system or web server platform.

When a user requests a webpage, PHP works on a web server through a process called interpretation. The PHP code is processed by a PHP interpreter. This interpreter can function as a module, a daemon, or a Common Gateway Interface (CGI) executable.

Scheme dynamic page en
Scheme dynamic page en

During this process, the interpreter executes the code to generate data. This data can be any type, such as HTML text or binary image data. This resulting data then forms the HTTP response sent to the user's browser. Various web frameworks and content management systems can be used to help organize how these responses are generated.

The history of PHP began in 1993 with a programmer named Rasmus Lerdorf. He originally wrote several CGI programs using the C language to maintain his own personal homepage. He later extended these programs to work with HTML forms and communicate with databases. He called this early version PHP/FI, which stood for Personal Home Page/Forms Interpreter.

Custom-software-developement-php-net
Custom-software-developement-php-net

Lerdorf released PHP/FI as "Personal Home Page Tools" on June 8, 1995. Interestingly, PHP was not originally intended to be a formal programming language. It grew organically as Lerdorf added new features to meet his needs. This organic growth sometimes led to inconsistent function names or parameter orders in early versions.

A major turning point occurred in 1997 when Zeev Suraski and Andi Gutmans rewrote the parser. This work formed the foundation for PHP 3, which was officially launched in June 1998. At this time, the name was changed to a recursive backronym: PHP: Hypertext Preprocessor. Suraski and Gutmans also created the Zend Engine in 1999 and founded Zend Technologies in Israel.

PHP 7.1 - Example phpinfo() Screen
PHP 7.1 - Example phpinfo() Screen

This engine acts as the core power for the language. Following this, PHP 4.0 was released on May 22, 2000, powered by Zend Engine 1.0. By August 2008, the PHP 4 branch had reached version 4.4.9, though it is no longer under development.

In 2004, PHP 5.0 was released with the new Zend Engine 2.0. This version brought significant changes, such as an overhauled approach to object-oriented programming. It also introduced iterators and exceptions. Later, the PHP 5.x series became the primary stable version. In 2008, a group of developers started the GoPHP5 initiative to help people move from PHP 4 to PHP 5. Developers also worked on a project to add Unicode support to the language. This project, intended for PHP 6, was eventually abandoned due to performance issues and a shortage of developers. Instead, the features were integrated into later PHP 5 releases, such as PHP 5.3 and 5.4.

PHP 7.0 was developed during 2014 and 2015 to greatly improve performance. This version was based on a project called "phpng," or PHP next generation. It was written by Dmitry Stogov, Xinchen Hui, and Nikita Popov.

"Hello World" Application in PHP
"Hello World" Application in PHP

By July 2014, benchmarks showed that this new approach increased performance by almost 100% in WordPress environments. This version used Zend Engine 3 and introduced a more consistent type system. It allowed for scalar types like integers and strings to be used in function declarations. It also added new operators, such as the "spaceship" three-way comparison operator.

The release of PHP 8.0 on November 26, 2020, introduced even more advanced features. One major addition was a JIT compiler, or just-in-time compiler. A JIT compiler can provide substantial performance boosts, especially for mathematical operations. PHP 8.0 also introduced attributes, which allow metadata to be added to program elements like classes or methods. The language has continued to grow more strict and organized through the addition of composite types. These include union types, intersection types, and disjunctive normal form (DNF) types. These tools help programmers write more precise and reliable code.

707 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (6)
File:Custom-software-developement-php-net.JPG
Custom-software-developement-php-net.JPG
File:Webysther 20160423 - Elephpant.svg
Webysther 20160423 - Elephpant.svg
File:"Hello World" Application in PHP.png
"Hello World" Application in PHP.png
File:PHP 7.1 - Example phpinfo() Screen.png
PHP 7.1 - Example phpinfo() Screen.png
File:LAMP software bundle.svg
LAMP software bundle.svg
File:Scheme dynamic page en.svg
Scheme dynamic page en.svg
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.