Unpack Array With String Keys
The ellipsis operator was introduced to unpack arrays. In PHP 7.4, it only supported integer keys, and not string keys. This was introduced in PHP 8.0.
PHP code
<?php
$array = ['a' => 1];
foo(...$array);
function foo($a) {
echo $a;
}
?>
Before
PHP Fatal error: Uncaught Error: Cannot unpack array with string keys
Fatal error: Uncaught Error: Cannot unpack array with string keys
After
1
PHP version change
This behavior changed in 8.0.