We briefly review the major new PHP language syntax introduced in each version since 5.3 – the version that birthed the features that paved the way for the prevailing PHP renaissance.

Always Every project. Common Most projects. Uncommon Some projects. Rare Almost never.

Features are ordered by how frequently you are likely to use them from a practical programming perspective according to the table.

If a feature does not appear in this reference it is because it is not syntax or is a minor modification of existing syntax.

New in PHP 5.3

Released June 30th, 2009.

New in PHP 5.4

Released March 1st, 2012.

Feature Examples Frequency Short array syntax ['foo'] Always Class member access on instantiation (new Class)->member(); Common Traits trait Foo extends Bar {} class Fubar { use Foo; } Uncommon Function array dereferencing $foo->toArray()[0]; Uncommon Binary number format 0b10100111001 Rare

New in PHP 5.5

Released June 20th, 2013.

New in PHP 5.6

Released August 28th, 2014.

References