PHP userland backwards compatibility layer that emulates PHP 5.5+ core functions.

⌈⌋ ⎇ branch:  upgrade.php


Artifact [2484eaab18]

Artifact 2484eaab18bf6044a7663c49c39f999cd2a97ffc:

  • File doc/tests1all/array_chunk.phpt — part of check-in [51e3884900] at 2010-06-22 17:03:27 on branch trunk — upgradephp-15 (user: mario size: 416)

--TEST--
array_chunk
--FILE--
<?php

$a = array("a", "b", "c", "d", "e");
$r = array_chunk($a, 2, 1);
echo 'array_chunk($a, 2, 1) = ';
print_r($r);

?>
--EXPECT--
array_chunk($a, 2, 1) = Array
(
    [0] => Array
        (
            [0] => a
            [1] => b
        )

    [1] => Array
        (
            [2] => c
            [3] => d
        )

    [2] => Array
        (
            [4] => e
        )

)