Zebrane w jedno miejsce krótkie podsumowanie zmian w wersjach 7.0-7.2.
PHP 7.0
Wybrane zmiany dla PHP 7.0 z krótkimi przykładami. Więcej informacji pod adresem:
http://php.net/manual/en/migration70.new-features.php
Scalar type declarationsbool, float, int, string |
|
Strict types declarationZły typ zmiennej będzie powodował błąd |
|
Return type declarations |
|
Null coalescing operatorSkrócona wersja warunku z isset |
|
Spaceship operator: $a <=> $bZwraca -1, 0 lub 1 kiedy $a jest kolejno mniejsze, równe, lub większe od $b |
|
Stałe mogą zawierać tablice |
|
Anonimowe klasy |
|
Filtrowane unserialize()allowed_classes domyślnie ma wartość false |
|
Group use declarations |
|
Generator Return Expressions |
|
Integer division with intdiv() |
|
PHP 7.1
Wybrane zmiany dla PHP 7.1 z krótkimi przykładami. Więcej informacji pod adresem:
http://php.net/manual/en/migration71.new-features.php
Nullable types |
|
Void functions |
|
Symmetric array destructuringFunkcja list może być zastąpiona [ ] |
|
Class constant visibility |
|
Multi catch exception handling |
|
Support for keys in list() |
|
Support for negative string offsets |
|
PHP 7.2
Wybrane zmiany dla PHP 7.2 z krótkimi przykładami. Więcej informacji pod adresem:
http://php.net/manual/en/migration72.new-features.php
New multibyte string functions |
|
New
|
|
Abstract method overriding |
|
Parameter type wideningParameter types from overridden methods and from interface implementations may now be omitted. |
|
Allow a trailing comma for grouped namespaces |
|
Dodaj komentarz