1--TEST--
2array_pad() tests
3--FILE--
4<?php
5
6var_dump(array_pad(array(), 1, 0));
7
8var_dump(array_pad(array(), 0, 0));
9var_dump(array_pad(array(), -1, 0));
10var_dump(array_pad(array("", -1, 2.0), 5, 0));
11var_dump(array_pad(array("", -1, 2.0), 5, array()));
12var_dump(array_pad(array("", -1, 2.0), 2, array()));
13var_dump(array_pad(array("", -1, 2.0), -3, array()));
14var_dump(array_pad(array("", -1, 2.0), -4, array()));
15
16?>
17--EXPECT--
18array(1) {
19  [0]=>
20  int(0)
21}
22array(0) {
23}
24array(1) {
25  [0]=>
26  int(0)
27}
28array(5) {
29  [0]=>
30  string(0) ""
31  [1]=>
32  int(-1)
33  [2]=>
34  float(2)
35  [3]=>
36  int(0)
37  [4]=>
38  int(0)
39}
40array(5) {
41  [0]=>
42  string(0) ""
43  [1]=>
44  int(-1)
45  [2]=>
46  float(2)
47  [3]=>
48  array(0) {
49  }
50  [4]=>
51  array(0) {
52  }
53}
54array(3) {
55  [0]=>
56  string(0) ""
57  [1]=>
58  int(-1)
59  [2]=>
60  float(2)
61}
62array(3) {
63  [0]=>
64  string(0) ""
65  [1]=>
66  int(-1)
67  [2]=>
68  float(2)
69}
70array(4) {
71  [0]=>
72  array(0) {
73  }
74  [1]=>
75  string(0) ""
76  [2]=>
77  int(-1)
78  [3]=>
79  float(2)
80}
81