Get Php Version

« back — written by Brent on June 02, 2020 Get

Php Version Check

It seems like a simple question with a simple answer: the latest PHP version currently is PHP 7.4. However! If you want to know more inside information about how PHP's lifecycle is managed, keep on reading!

How to Check the PHP Version Running a simple PHP file will not only tell you your PHP version but an abundance of information about all your PHP settings. Just put this single line of PHP code in a blank text file and open it on the server. PHP $GET is a PHP super global variable which is used to collect form data after submitting an HTML form with method='get'. $GET can also collect data sent in the URL. Assume we have an HTML page that contains a hyperlink with parameters. If you typecast the output of phpversion to a floating point number, it will give you the major and minor version parts. This way you can implement PHP compatibility easily.

# Levels of support

PHP versions are grouped in three levels of support: active, security fixes only and end of life. The 'end of life' versions should be avoided at all costs, usually a version goes into the 'end of life' phase after three years. A year before that, it goes into the 'security fixes only' phase, where only the most needed security fixes are released, and no more other improvements or bug fixes.

These are the currently active supported PHP versions:

PHP 7.2Security fixes until November 30, 2020
PHP 7.3Active support until December 6, 2020
PHP 7.4 (current)Active support until November 28, 2021

This release cycle guarantees that, usually, only three versions of PHP are supported at any given time, with only two being actively supported.I say usually because PHP 5.6 had a year extra of security fixes support, but that has also ended now: PHP 5.6 was supported up until December 31, 2018.

# A look at the past

So, if you're not running PHP 7.2, 7.3 or 7.4, you're running a version that won't receive any updates anymore. At least none from the official PHP developers. There are in fact companies still working independently on old PHP versions like PHP 5.6.

These initiatives of course only exist because there's a need for them: PHP 5.6 is somewhat the Windows XP of the PHP world: it was such a popular release at the time, and many older projects aren't able to deal with the breaking changes the new major version of PHP brings. As a sidenote: the new PHP version after PHP 5.6 is PHP 7 and 6 was skipped; but that's a story for another day.

The PHP 5.* era was the one that set PHP on a course for maturity, a path that would be continued in the 7.* versions, and one that has proven itself over the past years: PHP's performance increased significantly compared to the 5.* versions, the rich community only, and the language syntax and type system kept evolving towards a modern day language.

Obviously PHP bears the consequences of more than 26 years of legacy with it, but in that time it has also proven itself to be a robust and stable language, despite its reputation. To awaken synonym.

How to get php version =7.2.5

About that reputation — PHP is still looked down upon by many who don't know the modern language — PHP is quite a good language these days. Yes, it carries its battle scars, and we'd wish for many legacy things to just go away, but overall it's quite a nice tool; one that has proven itself time and time again.

These days, the core teams keeps a consistent release cycle: one new release every year, and every 4 or 5 years a new major release. And there are exiting times to come: 2020 will be the year of the new major release, since PHP 8 is coming by the end of the year!

Every new release is done in stages: the last months before the general availability — GA, or simply the release — is focused on testing all the new features and changes. First there are couple of alpha releases, followed by beta releases, followed by release candidates, followed by the final release: GA.

During the alpha phase, new features are still allowed to be added. But once in beta, the final form of the new version has been decided on.

These features, by the way, are decided upon by a core committee who votes on RFCs, which stands for request for comments. These RFCs describe a feature or a change to the language, and are discussed in depth. Everyone is allowed to make RFCs if they want to, but RFCs are of course critically looked at.

Get Php Version Of Website

# PHP 8 release schedule

Alpha 1June 25, 2020
Alpha 2July 9, 2020
Alpha 3July 23, 2020
Feature freezeAugust 04, 2020
Beta 1August 06, 2020
Beta 2August 20, 2020
Beta 3September 3, 2020
Beta 4September 17, 2020
Release candidate 1October 1, 2020
Release candidate 2October 15, 2020
Release candidate 3October 29, 2020
Release candidate 4November 12, 2020
General availabilityNovember 26, 2020

Get Php Version Windows

It is possible by the way, for the dates to shift a little bit still, this will depend on how testing goes early on. Speaking of testing: everyone is allowed to do so, it's even encouraged to try stuff out in your own projects, so that enough feedback can be provided to the core team on time.


How To Get Php Version

Tired of managing servers? Check out Serverless Visually Explained by Matthieu Napoli and learn how to create scalable PHP applications on AWS.

How Do I Get Php Version 5.6.20

I told you there was more to PHP's release cycle than just one active version 😁. My advice for modern-day projects would be this: always make sure to update at the latest a few months after GA. Don't lack behind 2 or 3 versions, or even worse: be stuck in PHP 5 land.

The updates actually never were that much of a pain, and there's so much to gain: performance improvements, security benefits, new syntax, wider community support. So keep that in mind, and let's look forward to PHP 8!