PHP 8.1 is coming — and it already promises to be one of the best releases
The coming version of PHP, scheduled for November 2021, is already packed with a lot of super exciting features.
Published in
4 min readJun 10, 2021
String-keyed array unpack
A simple operation, which wasn’t allowed until PHP 8.1. A code snippet worth a thousand words, here is what you’ll be able to do now:
This seems super simple, but you were only allowed to this with arrays with integer keys. As soon as you tried it with string-keyed arrays, you would get a fatal error.
Note that this new feature produce the exact same result as array_merge
, which you can use with string-keyed array on any PHP version where it is available.
IntlDatePatternGenerator
Internationalization of dates and format localization has always been a bit of a pain in PHP. This time is nearly over, and PHP…