summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_chunk_variation24.phpt
blob: c96d59d874ebf2b625fa821c89021af77b37ca44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--TEST--
array_chunk() - variation 24
--FILE--
<?php
$array = array ("a" => "A");
var_dump ($array);
for ($i = 1; $i < (sizeof($array) + 1); $i++) {
    echo "[$i]\n";
    var_dump (array_chunk ($array, $i));
    var_dump (array_chunk ($array, $i, TRUE));
    var_dump (array_chunk ($array, $i, FALSE));
    echo "\n";
}
?>
--EXPECT--
array(1) {
  ["a"]=>
  string(1) "A"
}
[1]
array(1) {
  [0]=>
  array(1) {
    [0]=>
    string(1) "A"
  }
}
array(1) {
  [0]=>
  array(1) {
    ["a"]=>
    string(1) "A"
  }
}
array(1) {
  [0]=>
  array(1) {
    [0]=>
    string(1) "A"
  }
}