Current release

PHP 5 was a big step forward for the language, although admittedly not as big as the jump from PHP 3 to PHP 4. The release is focused on language maturity, and offers a lot of new functionality that has simply been missing from previous versions simply because the language was a little too simple to properly support larger projects.

PHP 5 brought with it huge steps forward for object-oriented scripts - developers are now able to declare how their objects may be used, which makes it easier for one developer to work with another's code. Furthermore, there is a wide variety of functions available for objects that make them much more flexible and easy to work with - unified constructors are only available from v5 upwards.

PHP 5 also brought with it new error checking in the form of try/catch, which was something that programmers from other languages had been enjoying for a long time. Furthermore, objects are now always handled as references in order to help programmers who just do not understand how objects work.

The biggest improvements, though, were in the extensions: SimpleXML has landed, which is a fast and easy-to-learn way to interact with XML documents, and there's also the flat-file database API SQLite, a new SOAP extension, MySQL Improved, and a lot more.

Since the initial PHP 5.0 release, huge numbers of improvements have been introduced: 64-bit support, namespaces, an opcode cache, built-in debugging, generators, traits and more. Happily, development only seems to be getting faster, so there are even more huge improvements planned for future releases.

At the time of writing, PHP 5.6.8 is the latest release, and is recommend for all new PHP coding.


Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Upgrading from PHP 3 >>

Previous chapter: Early versions of PHP

Jump to:


Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.