PHP 5.4.0 offers a wide range of new
- Support for traits has been
- Short array syntax has
been added, e.g. $a = [1, 2, 3, 4]; or $a = [‘one’
=> 1, ‘two’ => 2, ‘three’ => 3, ‘four’ =>
- Function array
dereferencing has been added, e.g. foo().
- Closures now support
- <?= is now
always available, regardless of the short_open_tag
- Class member access on
instantiation has been added, e.g. (new
syntax is now supported.
- Binary number format has
been added, e.g. 0b001001101.
- Improved parse error
messages and improved incompatible arguments warnings.
- The session extension
can now track the upload progress of files.
- Built-in development
server in CLI mode.
- The GD extension now
supports reading and writing of WebP images via imagecreatefromwebp() and imagewebp(), respectively.