maettig.com

Thiemos Archiv

MediaWiki and the extensions I'm working on finally switched from PHP 5.3 to 5.5 a few months ago. I wrote a blog post back then, summarizing what awesome things PHP 5.4 and 5.5 give us: Short array syntax and the ::class keyword, to name just the two most important. But what will the next steps give us?

What's new in PHP 5.6:

  • Constants, class properties and default function arguments can contain simple expressions, e. g. const ONE_THIRD = 1 / 3;.
  • Array constants: const ARRAY = [1, 2];.
  • Native support for functions with a variable number of arguments, instead of relying on the func_get_args function: function fn( $first, ...$more ).
  • The same ... operator can also be used when calling a function: fn( $first, ...$more );.
  • use function and use const.
  • Finally an operator for the pow() function: ** as well as **=.
  • Added hash_equals.
  • Added JSON_PRESERVE_ZERO_FRACTION.
  • json_decode will reject upper case NULL and such.
  • default_charset changed to UTF-8 by default.

Kommentare zu diesem Beitrag können per E-Mail an den Autor gesandt werden.

[ ← Zurück zur Übersicht ]

Impressum & Datenschutz