summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_chunk_variation13.phpt
diff options
context:
space:
mode:
authorZoe Slattery <zoe@php.net>2009-02-14 10:29:22 +0000
committerZoe Slattery <zoe@php.net>2009-02-14 10:29:22 +0000
commit3efea3ac4cc04e891c413a951baf7265eb70d778 (patch)
treed3181660d630e989e9b742a56257de87ca32b006 /ext/standard/tests/array/array_chunk_variation13.phpt
parent0cf6df3d38d6bfbca7549d8530e3dd2ab326f5e3 (diff)
downloadphp-git-3efea3ac4cc04e891c413a951baf7265eb70d778.tar.gz
splitting array_chunk into smaller tests
Diffstat (limited to 'ext/standard/tests/array/array_chunk_variation13.phpt')
-rw-r--r--ext/standard/tests/array/array_chunk_variation13.phpt92
1 files changed, 92 insertions, 0 deletions
diff --git a/ext/standard/tests/array/array_chunk_variation13.phpt b/ext/standard/tests/array/array_chunk_variation13.phpt
new file mode 100644
index 0000000000..f6369df1c8
--- /dev/null
+++ b/ext/standard/tests/array/array_chunk_variation13.phpt
@@ -0,0 +1,92 @@
+--TEST--
+array_chunk() - variation 13
+--FILE--
+<?php
+$array = array (1, 2);
+var_dump ($array);
+for ($i = 0; $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(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+[0]
+NULL
+NULL
+NULL
+
+[1]
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [1]=>
+ int(2)
+ }
+}
+array(2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+}
+
+[2]
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}
+array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
+}