João Paulo Cercal

Staff Security Engineer at LastPass

  • PHP

PHP 5.4 Release

  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Read this article in

Hey folks! I’ve just seen, this very moment, that PHP 5.4 is fresh out of the oven, which you can check directly on the official PHP website.

PHP 5.4 Released

This version includes a large number of new features and bug fixes. If you’re not familiar with PHP yet, read the following post: Introduction to PHP.

Among the main new features are:

  • Traits
  • Built-in web server
  • Better performance and reduced memory consumption
  • Small improvements in various extensions
  • Short Tags are now always available
  • Array dereferencing (being able to use square brackets on elements that return an array)
1
2
3
4
<?php

// Exemplo:
foo()[0]
  • Short syntax for arrays
1
2
3
4
5
6
7
<?php

// Exemplo:
$a = [
  'um'   => 1,
  'dois' => 2
];