1--TEST--
2Test array_splice() function : usage variations - non array replacement values
3--FILE--
4<?php
5/*
6 * Function is implemented in ext/standard/array.c
7*/
8
9function test_splice ($replacement)
10{
11    $input_array=array(0,1);
12    var_dump (array_splice ($input_array,2,0,$replacement));
13    var_dump ($input_array);
14}
15
16test_splice (2);
17
18test_splice (2.1);
19
20test_splice (true);
21//file type resource
22$file_handle = fopen(__FILE__, "r");
23
24test_splice ($file_handle);
25echo "Done\n";
26?>
27--EXPECTF--
28array(0) {
29}
30array(3) {
31  [0]=>
32  int(0)
33  [1]=>
34  int(1)
35  [2]=>
36  int(2)
37}
38array(0) {
39}
40array(3) {
41  [0]=>
42  int(0)
43  [1]=>
44  int(1)
45  [2]=>
46  float(2.1)
47}
48array(0) {
49}
50array(3) {
51  [0]=>
52  int(0)
53  [1]=>
54  int(1)
55  [2]=>
56  bool(true)
57}
58array(0) {
59}
60array(3) {
61  [0]=>
62  int(0)
63  [1]=>
64  int(1)
65  [2]=>
66  resource(%d) of type (stream)
67}
68Done
69