PHP Function Unpack
The php function unpack transforms binary data into an associative array, based on the format specified. The format string consists of a format character, optionally followed by an integer that indicates either a length or a quantity, and then by a string used as the key for entries in the associative array that are created.
Unpacking supports both positional and named arguments. However, it is important to note that any positional argument placed after the three dots cannot be filled by a named parameter, or a Fatal error Will not unpack with named parameter after unpacked with positional argument is emitted. Similarly, a named parameter may not overwrite a spot that was already filled by a positional argument during the unpacking process.
This is because the naming of an argument with a leading ''' (which will be converted to the underscore character during lexing) may conflict with the existing positioning of the name of the parameter in the unpacked data. This feature works in PHP 8.0 and later versions.
If you try to use this functionality with an older version of PHP, you will meet with a Fatal error Cannot unpack array with string keys unless the array_merge() method is also used to merge the unpacked arrays, or with an earlier version of PHP which does not support array_merge(). It is a bit of an edge case, since both the positional and named parameters are rarely placed at the same time in a method call.