1--TEST-- 2array unpacking with string keys (not supported) 3--FILE-- 4<?php 5 6try { 7 $array = [1, 2, "foo" => 3, 4]; 8 var_dump([...$array]); 9} catch (Error $ex) { 10 var_dump($ex->getMessage()); 11} 12try { 13 $iterator = new ArrayIterator([1, 2, "foo" => 3, 4]); 14 var_dump([...$iterator]); 15} catch (Error $ex) { 16 var_dump($ex->getMessage()); 17} 18 19?> 20--EXPECT-- 21string(36) "Cannot unpack array with string keys" 22string(42) "Cannot unpack Traversable with string keys" 23