Stable Release in branch 5.5
5.5.38
Released 21 Jul 2016
(10 years ago)
SoftwarePHP
Version5.5
Status
End of life
Initial release5.5.0
20 Jun 2013
(13 years ago)
Latest release5.5.38
21 Jul 2016
(10 years ago)
End of bug fixes21 Jul 2015
(Ended 11 years ago)
End of security fixes21 Jul 2016
(Ended 10 years ago)
Release noteshttps://www.php.net/ChangeLog-5.php#5.5.38
Source codehttps://github.com/php/php-src/tree/php-5.5.38
Documentationhttps://www.php.net/manual/en/
Downloadhttps://www.php.net/releases/5.5.38
PHP 5.5 ReleasesView 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

VersionRelease date
5.5.3821 Jul 2016
(10 years ago)
5.5.3723 Jun 2016
(10 years ago)
5.5.3626 May 2016
(10 years ago)
5.5.3531 Mar 2016
(10 years ago)
5.5.3431 Mar 2016
(10 years ago)
5.5.3303 Mar 2016
(10 years ago)
5.5.3204 Feb 2016
(10 years ago)
5.5.3107 Jan 2016
(10 years ago)
5.5.3001 Oct 2015
(10 years ago)
5.5.2903 Sep 2015
(10 years ago)
5.5.2806 Aug 2015
(11 years ago)
5.5.2709 Jul 2015
(11 years ago)
5.5.2611 Jun 2015
(11 years ago)
5.5.2514 May 2015
(11 years ago)
5.5.2416 Apr 2015
(11 years ago)
5.5.2320 Feb 2015
(11 years ago)
5.5.2220 Feb 2015
(11 years ago)
5.5.2122 Jan 2015
(11 years ago)
5.5.2018 Dec 2014
(11 years ago)
5.5.1913 Nov 2014
(11 years ago)
5.5.1816 Oct 2014
(11 years ago)
5.5.1718 Sep 2014
(11 years ago)
5.5.1621 Aug 2014
(11 years ago)
5.5.1524 Jul 2014
(12 years ago)
5.5.1426 Jun 2014
(12 years ago)
5.5.1329 May 2014
(12 years ago)
5.5.1230 Apr 2014
(12 years ago)
5.5.1103 Apr 2014
(12 years ago)
5.5.1006 Mar 2014
(12 years ago)
5.5.906 Feb 2014
(12 years ago)
5.5.809 Jan 2014
(12 years ago)
5.5.712 Dec 2013
(12 years ago)
5.5.614 Nov 2013
(12 years ago)
5.5.517 Oct 2013
(12 years ago)
5.5.419 Sep 2013
(12 years ago)
5.5.322 Aug 2013
(12 years ago)
5.5.215 Aug 2013
(12 years ago)
5.5.118 Jul 2013
(13 years ago)
5.5.020 Jun 2013
(13 years ago)