New Features
PHP Core
More Flexible Heredoc and Nowdoc Syntax
The closing marker for doc strings is no longer required to be followed by a semicolon or newline. Additionally the closing marker may be indented, in which case the indentation will be stripped from all lines in the doc string.
Array Destructuring supports Reference Assignments
Array destructuring now supports reference assignments using the syntax [&$a, [$b, &$c]] = $d. The same is also supported for list().
Instanceof Operator accepts Literals
instanceof now allows literals as the first operand, in
which case the result is always FALSE
.
CompileError Exception instead of some Compilation Errors
A new CompileError exception has been added, from
which ParseError inherits. A small number of
compilation errors will now throw a CompileError
instead of generating a fatal error. Currently this only affects compilation
errors that may be thrown by token_get_all() in
TOKEN_PARSE
mode, but more errors may be converted in
the future.
Argon2id Support
The --with-password-argon2[=dir]
configure
argument now provides support for both Argon2i and Argon2id hashes in the
password_hash(), password_verify(),
password_get_info(), and
password_needs_rehash() functions. Passwords may be hashed
and verified using the PASSWORD_ARGON2ID
constant.
Support for both Argon2i and Argon2id in the password_*()
functions now requires PHP be linked against libargon2 reference library ≥
20161029.
FastCGI Process Manager
New options have been added to customize the FPM logging:
- log_limit
- This global option can be used for setting the log limit for the logged line which allows to log messages longer than 1024 characters without wrapping. It also fixes various wrapping issues.
- log_buffering
- This global option allows an experimental logging without extra buffering.
- decorate_workers_output
- This pool option allows to disable the output decoration for workers output when catch_workers_output is enabled.
Lightweight Directory Access Protocol
Full support for LDAP Controls has been added to the LDAP querying functions and ldap_parse_result():
- A $serverctrls parameter to send controls to the server in ldap_add(), ldap_mod_replace(), ldap_mod_add(), ldap_mod_del(), ldap_rename(), ldap_compare(), ldap_delete(), ldap_modify_batch(), ldap_search(), ldap_list() and ldap_read() has been added.
- The out parameter $serverctrls to get controls from the server in ldap_parse_result() has been added.
-
Support for
LDAP_OPT_SERVER_CONTROLS
andLDAP_OPT_CLIENT_CONTROLS
in ldap_get_option() and ldap_set_option() has been fixed.
Multibyte String Functions
Full Case-Mapping and Case-Folding Support
Support for full case-mapping and case-folding has been added. Unlike simple case-mapping, full case-mapping may change the length of the string. For example:
<?php
mb_strtoupper("Straße");
// Produces STRAßE on PHP 7.2
// Produces STRASSE on PHP 7.3
?>
-
MB_CASE_LOWER
(used by mb_strtolower()) -
MB_CASE_UPPER
(used by mb_strtoupper()) -
MB_CASE_TITLE
-
MB_CASE_FOLD
-
MB_CASE_LOWER_SIMPLE
-
MB_CASE_UPPER_SIMPLE
-
MB_CASE_TITLE_SIMPLE
-
MB_CASE_FOLD_SIMPLE
(used by case-insensitive operations)
Case-Insensitive String Operations use Case-Folding
Case-insensitive string operations now use case-folding instead of case- mapping during comparisons. This means that more characters will be considered (case insensitively) equal now.
MB_CASE_TITLE performs Title-Case Conversion
mb_convert_case() with MB_CASE_TITLE
now performs title-case conversion based on the Cased and CaseIgnorable
derived Unicode properties. In particular this also improves handling of
quotes and apostrophes.
Performance Improvements
Performance of the Multibyte String extension has been significantly improved across the board. The largest improvements are in case conversion functions.
Named Captures Support
The mb_ereg_* functions now support named captures. Matching functions like mb_ereg() will now return named captures both using their group number and their name, similar to PCRE:
<?php
mb_ereg('(?<word>\w+)', '国', $matches);
// => [0 => "国", 1 => "国", "word" => "国"];
?>
\k<>
and \k''
notations to reference named
captures in the replacement string:
<?php
mb_ereg_replace('\s*(?<word>\w+)\s*', "_\k<word>_\k'word'_", ' foo ');
// => "_foo_foo_"
?>
\k<>
and \k''
can also be used for numbered
references, which also works with group numbers greater than 9.
Readline
Support for the completion_append_character and completion_suppress_append options has been added to readline_info(). These options are only available if PHP is linked against libreadline (rather than libedit).
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 30/01/2003, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/php-rf-migration73.new-features.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.