pecl/parallel

A succinct parallel concurrency API for PHP 8

Maintainers

Package info

github.com/krakjoe/parallel

Language:C

Type:php-ext

Ext name:ext-parallel

pkg:composer/pecl/parallel

Fund package maintenance!

krakjoe

gofund.me/c34f3dde

Statistics

Installs: 1 166

Dependents: 0

Suggesters: 0

Stars: 1 588

Open Issues: 5

v1.2.12 2026-03-18 13:39 UTC

README

Linux AddressSanitizer Windows Coverage Status

A succinct parallel concurrency API for PHP 8

GoFundMe

Documentation

Documentation can be found in the PHP manual: https://php.net/parallel

Requirements and Installation

See INSTALL.md

Hello World

<?php
$runtime = new \parallel\Runtime();

$future = $runtime->run(function(){
    for ($i = 0; $i < 500; $i++)
        echo "*";

    return "easy";
});

for ($i = 0; $i < 500; $i++) {
    echo ".";
}

printf("\nUsing \\parallel\\Runtime is %s\n", $future->value());

This may output something like (output abbreviated):

.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*
Using \parallel\Runtime is easy

Development

See CONTRIBUTING.md for guidelines on contribution and development (and debugging).