Registry / async / spatie-fork

spatie-fork

JSON →
library1.2.7phppackagistunverified

A lightweight solution for running code concurrently in PHP.

composer require spatie/fork
INSTALL
IMPORT
SIG · SPATIE-FORK
S
spatie-fork
asyncphpv1.2.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Fork
use Spatie\Fork\Fork;

Run two tasks concurrently using Fork.

use Spatie\Fork\Fork; $results = Fork::new() ->run( fn () => file_get_contents('https://example.com'), fn () => file_get_contents('https://example.org'), );
Debug
Known issues
breakingRequires pcntl extension for process forking.
fix
Install pcntl extension (not available on Windows).
affects: >=1.0.0
Upgrade
Version history
1.2.7latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
20
OpenAI (training)
1
Resources
spatie-fork — pip install spatie-fork · libregistry