diff options
author | Zoe Slattery <zoe@php.net> | 2009-02-14 10:29:22 +0000 |
---|---|---|
committer | Zoe Slattery <zoe@php.net> | 2009-02-14 10:29:22 +0000 |
commit | 3efea3ac4cc04e891c413a951baf7265eb70d778 (patch) | |
tree | d3181660d630e989e9b742a56257de87ca32b006 /ext/standard/tests/array/array_chunk_variation13.phpt | |
parent | 0cf6df3d38d6bfbca7549d8530e3dd2ab326f5e3 (diff) | |
download | php-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.phpt | 92 |
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) + } +} |