1--TEST--
2Test array_splice() function : error conditions
3--FILE--
4<?php
5/*
6 * proto array array_splice(array input, int offset [, int length [, array replacement]])
7 * Function is implemented in ext/standard/array.c
8*/
9
10echo "\n*** Testing error conditions of array_splice() ***\n";
11
12$int=1;
13$array=array(1,2);
14var_dump (array_splice());
15var_dump (array_splice($int));
16var_dump (array_splice($array));
17var_dump (array_splice($int,$int));
18$obj= new stdclass;
19var_dump (array_splice($obj,0,1));
20echo "Done\n";
21
22?>
23--EXPECTF--
24*** Testing error conditions of array_splice() ***
25
26Warning: array_splice() expects at least 2 parameters, 0 given in %s on line %d
27NULL
28
29Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
30NULL
31
32Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
33NULL
34
35Warning: array_splice() expects parameter 1 to be array, integer given in %s on line %d
36NULL
37
38Warning: array_splice() expects parameter 1 to be array, object given in %s on line %d
39NULL
40Done
41