5.5.38

Latest release in branch 5.5
Released 9 years ago (July 21, 2016)

Software PHP
Branch 5.5
Status
End of life
End of bug fixes July 21, 2015
End of security fixes July 21, 2016
First official release version 5.5.0
First official release date 12 years ago (June 20, 2013)
Release notes https://www.php.net/ChangeLog-5.php#5.5.38
Source code https://github.com/php/php-src/tree/php-5.5.38
Documentation https://www.php.net/manual/en/
Download https://www.php.net/releases/5.5.38
PHP 5.5 Releases View full list

What Is New in PHP 5.5

PHP 5.5 delivers a significant upgrade with new language features, performance improvements, and the removal of legacy functionality. This release focuses on modernizing the language for more expressive and efficient code.

Category Key Changes
New Features Generators, finally keyword, constant array/string dereferencing, simplified password hashing API
Performance OPcache extension now bundled and compiled by default
Deprecated Windows XP and 2003 support, mysql extension, preg_replace /e modifier
Changes SSL improvements, support for MySQLnd as default, updated Ext/Intl

What are the major new language features?

Generators are the standout feature, introducing a simple way to implement iterators without the overhead of a full class. You use the yield keyword to provide values to a foreach loop on the fly.

function numberGenerator() {
    for ($i = 0; $i < 5; $i++) {
        yield $i;
    }
}

foreach (numberGenerator() as $number) {
    echo $number;
}

The finally block brings PHP's exception handling in line with other languages, guaranteeing that a block of code will run after a try, regardless of whether an exception was thrown or caught.

How did password handling improve?

PHP 5.5 introduced a dedicated, simple, and secure API for password hashing. The new functions password_hash() and password_verify() abstract away the complexity of salting and using strong algorithms like BCrypt.

// Hashing a password
$hash = password_hash('my_password', PASSWORD_DEFAULT);

// Verifying a password
if (password_verify('my_password', $hash)) {
    // Password is valid
}

This was a huge win for security, making it much harder for developers to incorrectly implement password storage. The old methods involving md5() or sha1() became instantly obsolete.

What performance enhancements were made?

The most significant performance boost came from bundling the Zend OPcache extension directly into the core and enabling it by default. OPcache stores precompiled script bytecode in shared memory, eliminating the need for PHP to load and parse scripts on every request.

This change drastically reduced CPU usage and improved throughput for most applications. For many, simply upgrading to 5.5 provided a free speed upgrade without any code changes.

What was deprecated and removed?

This release continued the push to clean up old cruft. The original mysql extension was officially deprecated, urging developers to move to mysqli or PDO. The preg_replace /e modifier was also deprecated due to its security implications.

Support for older Windows operating systems (XP and 2003) was dropped, allowing the core team to focus on modern platforms. This cleanup is a necessary part of keeping the language modern and maintainable.

FAQ

Do I have to use OPcache in PHP 5.5?
It is compiled and enabled by default, but you can configure it or disable it in your php.ini file. For production use, leaving it on is highly recommended for the performance benefits.

Why should I stop using the mysql_* functions?
The mysql extension is deprecated in 5.5 and was completely removed in a later version (PHP 7.0). It lacks support for modern MySQL features, prepared statements, and stored procedures offered by mysqli and PDO.

What is the advantage of using generators?
Generators are memory efficient. They allow you to iterate over large data sets or compute-intensive operations without needing to build and store a large array in memory first, which is great for processing large files or database results.

Is the new password API more secure?
Yes, absolutely. It handles secure salt generation automatically and uses a strong hashing algorithm (BCrypt by default). It effectively prevents common mistakes developers made when trying to implement hashing manually.

What does constant dereferencing allow me to do?
It allows you to directly access an element of an array or a character of a string that is returned by a function or a constant, without needing to use a temporary variable. For example: echo getArray()[0]; or echo 'ABCD'[1]; // outputs 'B'

Releases In Branch 5.5

Version Release date
5.5.38 9 years ago
(July 21, 2016)
5.5.37 9 years ago
(June 23, 2016)
5.5.36 9 years ago
(May 26, 2016)
5.5.35 10 years ago
(March 31, 2016)
5.5.34 10 years ago
(March 31, 2016)
5.5.33 10 years ago
(March 03, 2016)
5.5.32 10 years ago
(February 04, 2016)
5.5.31 10 years ago
(January 07, 2016)
5.5.30 10 years ago
(October 01, 2015)
5.5.29 10 years ago
(September 03, 2015)
5.5.28 10 years ago
(August 06, 2015)
5.5.27 10 years ago
(July 09, 2015)
5.5.26 10 years ago
(June 11, 2015)
5.5.25 10 years ago
(May 14, 2015)
5.5.24 11 years ago
(April 16, 2015)
5.5.23 11 years ago
(February 20, 2015)
5.5.22 11 years ago
(February 20, 2015)
5.5.21 11 years ago
(January 22, 2015)
5.5.20 11 years ago
(December 18, 2014)
5.5.19 11 years ago
(November 13, 2014)
5.5.18 11 years ago
(October 16, 2014)
5.5.17 11 years ago
(September 18, 2014)
5.5.16 11 years ago
(August 21, 2014)
5.5.15 11 years ago
(July 24, 2014)
5.5.14 11 years ago
(June 26, 2014)
5.5.13 11 years ago
(May 29, 2014)
5.5.12 11 years ago
(April 30, 2014)
5.5.11 12 years ago
(April 03, 2014)
5.5.10 12 years ago
(March 06, 2014)
5.5.9 12 years ago
(February 06, 2014)
5.5.8 12 years ago
(January 09, 2014)
5.5.7 12 years ago
(December 12, 2013)
5.5.6 12 years ago
(November 14, 2013)
5.5.5 12 years ago
(October 17, 2013)
5.5.4 12 years ago
(September 19, 2013)
5.5.3 12 years ago
(August 22, 2013)
5.5.2 12 years ago
(August 15, 2013)
5.5.1 12 years ago
(July 18, 2013)
5.5.0 12 years ago
(June 20, 2013)