2007-10-26 11:07:13 +00:00
|
|
|
--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--
|
|
|
|
|
2007-11-02 19:41:12 +00:00
|
|
|
Warning: array_splice() expects at most 4 parameters, 10 given in %s on line %d
|
2007-10-26 11:07:13 +00:00
|
|
|
NULL
|
|
|
|
array(3) {
|
|
|
|
[0]=>
|
|
|
|
int(0)
|
|
|
|
[1]=>
|
|
|
|
int(1)
|
|
|
|
[2]=>
|
|
|
|
int(2)
|
|
|
|
}
|
2007-11-02 19:41:12 +00:00
|
|
|
Done
|