Not much would care about this one, but it’s worth to mention that previously you could override the whole $GLOBALS
variable with your custom data, now you can only modify its keys/aliases.
array
PHP 8.1 – New feature array_is_list()
Added a new check to array
to see if it contains only an int based keys in natural order (from 0 to n`). Useful when we want to ensure the array is consistent (untouched) and when we want to serialize an array
to json
to format of [0, 1, 2]
instead of object properties.
PHP 8.1 – Deprecate autovivification on false
You won’t be able to initialize array from falsy values any more this include: only false values and nothing else.