PHP 7.3: What's New and Changed
PHP 7.3 brings several Quality-of-Life improvements to PHP. Major improvements include the flexible Heredoc/Nowdoc syntax, a high-resolution timer, is_countable()
function to help with the numerous PHP notices raised because PHP 7.2 deprecated using count()
function on uncountable values, list() improvements, and new Argon2ID password hashing algorithm.
This version does not bring major syntax improvements to the table. It cleans up a lot of legacy aliased functions, and brings modern password hashing algorithm in continuation of the Argon2I introduced in PHP 7.2.
Except for the flexible heredoc/nowdoc syntax and improvements in list()
construct supporting references, the rest of the major changes are available as polyfills.
New Features
- Introduced is_countable() function
- Heredoc and Nowdoc syntax requirements are more relaxed
- Option to make
json_encode
andjson_decode
throw exceptions on errors - Introduced
array_key_first()
andarray_key_last()
functions - SameSite cookie support
Syntax/Functionality Changes
- Allow trailing comma in function and method calls
- References in
list()
- PCRE to PCRE2 migration
- Warning on undefined variable names passed to
compact