summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/send_unpack_empty_array.phpt
blob: f2325626f1b18780efa529c8e5e0e2e37c75dad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Type inference of SEND_UNPACK with empty array
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function test() {
    $array = [1, 2, 3];
    $values = [];
    var_dump(array_push($array, 4, ...$values));
    var_dump($array);
}
test();
?>
--EXPECT--
int(4)
array(4) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
}