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
25*** Testing error conditions of array_splice() ***
26
27Warning: array_splice() expects at least 2 parameters, 0 given in %s on line %d
28NULL
29
30Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
31NULL
32
33Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
34NULL
35
36Warning: array_splice() expects parameter 1 to be array, integer given in %s on line %d
37NULL
38
39Warning: array_splice() expects parameter 1 to be array, object given in %s on line %d
40NULL
41Done
42