1--TEST--
2Test array_slice() - Third parameter (NULL vs 0)
3--FILE--
4<?php
5
6var_dump(array_slice(range(1, 3), 0, NULL, 1));
7var_dump(array_slice(range(1, 3), 0, 0, 1));
8var_dump(array_slice(range(1, 3), 0, NULL));
9var_dump(array_slice(range(1, 3), 0, 0));
10
11var_dump(array_slice(range(1, 3), -1, 0));
12var_dump(array_slice(range(1, 3), -1, 0, 1));
13var_dump(array_slice(range(1, 3), -1, NULL));
14var_dump(array_slice(range(1, 3), -1, NULL, 1));
15
16
17$a = 'foo';
18var_dump(array_slice(range(1, 3), 0, $a));
19var_dump(array_slice(range(1, 3), 0, $a));
20var_dump($a);
21
22?>
23--EXPECT--
24array(3) {
25  [0]=>
26  int(1)
27  [1]=>
28  int(2)
29  [2]=>
30  int(3)
31}
32array(0) {
33}
34array(3) {
35  [0]=>
36  int(1)
37  [1]=>
38  int(2)
39  [2]=>
40  int(3)
41}
42array(0) {
43}
44array(0) {
45}
46array(0) {
47}
48array(1) {
49  [0]=>
50  int(3)
51}
52array(1) {
53  [2]=>
54  int(3)
55}
56array(0) {
57}
58array(0) {
59}
60string(3) "foo"
61