Overview of PHP Versions
PHP stands for Hypertext preprocessor language and is a commonly used language for web development or software development. It was created in 1994 and was written by Rasmus Lerdorf. Developers may execute or interact with the PHP code through the command line interface or embed it into HTML code or with various web frameworks or content management systems. PHP code requires a web server or a Common Gateway Interface executable. The PHP interpreter is powered by the Zend Engine which is available as free software under the PHP License. This implies that PHP code and web apps can be deployed on all operating systems without any charges or costs involved. In this article, we will look at the different versions of PHP in detail.
Top PHP Versions
Here are the top 6 PHP Versions explained in detail below:
1. PHP Version 1.0
- As mentioned before, PHP development started way back in 1994 and was developed by Rasmus Lerdorf. He used C as a scripting language and wrote several Common Gateway Interface programs.
- He originally used them to maintain his personal homepage. He later extended these code specs to work with web forms and databases. This upgraded implementation was called Personal Home Page or Forms interpreted.
- This initial version of PHP already had several basic functionalities. It has form handling capabilities, Perl like variables and the ability to work with HTML. The syntax was also similar to; however, it was simpler but inconsistent.
2. PHP Version 2.0
- The initial version of PHP, though not very refined gained a lot of popularity by the developer community when it was released for public usage in 1995.
- As its popularity continued to grow, a formal developer team was formed to work on the inconsistencies of version 1.
- Once the inconsistencies were overcome, the updated language was released as version 2 in 1997.
3. PHP Version 3.0
- As PHP’s popularity grew, it attracted the attention of Zeev Suraski and Andi Gutmans.
- In 1997, Zeev Suraski and Andi Gutmans rewrote the internal PHP parser and formed the basic structure for PHP 3. The official launch of PHP 3 was done in June 1998 once the public testing was completed.
- Later, Suraski and Gutmans started with re-write the core PHP and produced the Zend engine in 1999. This led to the foundation of Zend Technologies in Israel.
4. PHP Version 4.0
- Finally, in the year 2000, PHP version 4 powered by Zend Engine 1 was released for public usage.
- By 2008, PHP version 4 had evolved and reached 4.4.9. However, PHP version 4 is no more supported for security updates.
5. PHP Version 5.0 and 6.0
- In 2004, PHP version 5 was released and was powered by Zend Engine 2.
- It included several new features and better support for Object-Oriented Programming (OOP), PDO (PHP Data Objects) extension which provides a lightweight interface to programmers for accessing database and many other performance improvements.
- PHP version 5 scaled up to version 5.6. In December 2018, official support for PHP security ended but Debian continued to provide security support until 2020.
- When the developers started to use PHP 5 for the development of applications, it was realized that PHP 5.0 had insufficient support for Unicode encoding due to which the developer community had mixed opinions about it.
- In 2005, Andrei Zmievski took charge to overcome this hindrance and launch a project to embed Unicode support throughout the PHP system.
- In order to achieve this, he included the ICU i.e International Components for Unicode library across the basic PHP system. With this change, the text strings in PHP were internally represented as 16 bit Unicode Transformation Format or commonly known as UTF – 16.
- The migration was partially completed, when it was realized that conversion to and from UTF – 16 could also cause several performance issues and eventually the project was midway abandoned. This exercise further stressed on the importance of an efficient method to embed Unicode support in PHP’s core.
- In the month of March 2010, PHP’s version 6.0 was released with non-Unicode features like traits and closure binding. This update left the developer community hoping for efficient Unicode integration.
6. The Current PHP Version 7.0
- During the period of 2016 and 2017, PHP underwent major changes and the update was released as PHP 7. The version number selected for rolling out this release has to face several debates.
- In spite of the PHP Unicode project not officially released, several books had referencing included in them addressing it as PHP version 6. If an actual release would have been also rolled out as version 6, it would have caused confusion in the developer community. Hence, it was decided to release this update as version 7.0.
- PHP 7 is based on phpng which stands for PHP next Generation. PHP Next Generation was an initiative by developers to overcome the high-performance constraints of previous PHP versions. The phpng branch served as the base branch for PHP version 7.0.
- PHP 7 did provide several optimizations and performance improvements. It also included an in-build caching mechanism for better performance. But these could never match the performance a JIT compiler could provide.
- Though PHP can continue to evolve it also has certain drawbacks due to which it may not appeal to all developers. PHP is an open-source code language, which means anybody can access its core ode base and identify shortcomings to take advantage of.
- As a result of this weakness, the probability of PHP websites to be hacked is higher than those built-in other languages. Since PHP is not very modular, it is not a favorable language for developing large applications. Also, PHP data types may surprise new programmers. For instance, the string “1000” is the same as “1e3” as they both cast to float type.
As discussed above, from its first release itself, PHP has been very popular in the developer community despites it’s inconsistencies and performance issues. It is an easy to use language and its creators are committed to continuing PHP’s evolution to overcome these issues. The continuous improvement cycle of PHP has still kept many developers hooked to PHP as a web development language in spite of cutting edge competition from PHP peers like Python and Java.
This is a guide to PHP Versions. Here we discuss the Overview and top 6 PHP versions with their detailed explanation. You may also look at the following articles to learn more –