As of PHP 8.0.0, a ValueError is thrown if the number of elements in
keys and values does not
match.
Prior to PHP 8.0.0, a E_WARNING was emitted instead.
Changelog
Version
Description
8.0.0
array_combine() will now throw a
ValueError if the number of elements
for each array is not equal;
previously this function returned false instead.