Skip to content

WyriHaximus-labs/parallel

 
 

Repository files navigation

parallel

Build Status Build status Coverage Status

A succinct parallel concurrency API for PHP 8

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

About

A succinct parallel concurrency API for PHP8

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 76.1%
  • PHP 21.3%
  • C++ 1.6%
  • Other 1.0%