summaryrefslogtreecommitdiff
path: root/Zend/tests/array_unpack_string_keys.phpt
blob: ce84a8e21dacedc2339b3f033e3515c181929dfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Using array unpacking in an array literal that also has string keys (OSS-Fuzz #17965)
--FILE--
<?php
$y = [1, 2, 3];
$z = "bar";
$x = [...$y, "foo" => $z];
var_dump($x);
?>
--EXPECT--
array(4) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  ["foo"]=>
  string(3) "bar"
}