summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_splice_variation2.phpt
blob: 42692918d104ab7723cc8dca44bc8e5c7aa17d75 (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
27
--TEST--
Test array_splice() function : usage variations - additional parameters
--FILE--
<?php
/*
 * proto array array_splice(array input, int offset [, int length [, array replacement]])
 * Function is implemented in ext/standard/array.c
*/

$array=array(0,1,2);
var_dump (array_splice($array,1,1,3,4,5,6,7,8,9));
var_dump ($array);
echo "Done\n";
?>
--EXPECTF--

Warning: array_splice() expects at most 4 parameters, 10 given in %s on line %d
NULL
array(3) {
  [0]=>
  int(0)
  [1]=>
  int(1)
  [2]=>
  int(2)
}
Done