summaryrefslogtreecommitdiff
path: root/Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt')
-rw-r--r--Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt19
1 files changed, 16 insertions, 3 deletions
diff --git a/Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt b/Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt
index 1401fb9bd5..df58d78a6a 100644
--- a/Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt
+++ b/Zend/tests/array_unpack/unpack_string_keys_compile_time.phpt
@@ -1,10 +1,23 @@
--TEST--
-Unpacking of string keys detected at compile-time
+Unpacking of string keys is supported at compile-time
--FILE--
<?php
var_dump([...['a' => 'b']]);
+var_dump(['a' => 'X', ...['a' => 'b']]);
+var_dump([...['a' => 'b'], 'a' => 'X']);
?>
---EXPECTF--
-Fatal error: Cannot unpack array with string keys in %s on line %d
+--EXPECT--
+array(1) {
+ ["a"]=>
+ string(1) "b"
+}
+array(1) {
+ ["a"]=>
+ string(1) "b"
+}
+array(1) {
+ ["a"]=>
+ string(1) "X"
+}