array_chunk
brefphp/bref
Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Split an array into chunks
array_chunk
(array
$array
,
int $length
,
bool $preserve_keys
=
false
): array
function
runProcessesInParallel
(array
$processes
):
void
{
foreach (
array_chunk
(
$processes
,
4
) as
$batch
) {
array_map
(function (
Process $process
):
void
{
$process
->
start
();
runtime/layers/publish.php