spatie/fork
Some data may be outdated — see provenance labels.
A lightweight solution for running code concurrently in PHP observed · 2026-09-29
Health v2 · maintenance only
91/100
- Activity 94
- Release rhythm 83
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-22. Adoption (stars, forks) is never an input.
- gap_med: 86
- age_days: 2008
- days_rel: 37
- days_push: 37
- n_releases_24m: 6
Adoption not part of the score
1048 stars · 114 forks observed · 2026-09-29
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A lightweight PHP library for running code concurrently by forking the main PHP process into child tasks. It lets you pass multiple closures to a single run call and collect their return values, requiring PHP 8 with the pcntl extension in CLI contexts.
Use cases
- run multiple slow API calls in parallel from PHP
- execute closures concurrently in a PHP CLI script
- speed up batch processing by forking PHP processes
- parallelize independent tasks in PHP without async complexity
- fan out work to child processes and collect results
When to choose
- you need simple process-based concurrency in PHP CLI scripts
- you want a minimal API without learning async frameworks
- your tasks are independent and communicate only via return values
When to avoid
- you need concurrency in a web (non-CLI) request context, since pcntl is unavailable there
- you need shared memory or message passing between tasks
- you target Windows or environments without the pcntl extension
Facets
library · maturity active
concurrency developer-tools developer-tools performance cli php process-forking pcntl parallel-execution php linux macos
4 sources
- readme: https://github.com/spatie/fork · fetched 2026-09-29 · 1d12552baf42
- homepage: https://spatie.be/open-source · fetched 2026-08-29 · 6ed5abf69535
- site_page: https://spatie.be/docs · fetched 2026-08-29 · 08e024d86d95
- site_page: https://spatie.be/about-us · fetched 2026-08-29 · d3cb88e4b34c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/fork | main | 91 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem