| Recommend this page to a friend! |
| Info | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2026-02-11 (1 month ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked | |||||
| Version | License | PHP version | Categories | |||
| concurrent 1.0.0 | MIT/X Consortium ... | 8.1 | Language, Performance and optimization, P... |
| Description | Author | |||||||||||||||||||||||
This package can manage the execution of several tasks using Fibers. Innovation Award
|
| |||||||||||||||||||||||
Concurrent brings safe, structured concurrency to PHP 8.1+ using native Fibers.
It offers a simple, blocking-style API that any PHP developer can understand – without needing to learn event-loop patterns, promise chains, or process forking.
Concurrent brings safe, structured concurrency to PHP 8.1+ using native Fibers. It offers a simple, blocking-style API that any PHP developer can understand – without needing to learn event-loop patterns, promise chains, or process forking.
PHP applications frequently need to perform multiple I/O operations at once: calling several REST APIs, querying different databases, reading multiple files, or aggregating data from microservices. Traditional solutions force you to either:
PHP 8.1 introduced Fibers – low-level primitives for cooperative multitasking – but left a gap for a high-level, beginner-friendly API.
Concurrent fills that gap. It provides a tiny scheduler that manages Fibers transparently. You write plain, sequential code – Concurrent runs it in parallel.
$userTask = Concurrent::spawn(fn() => $this->db->query('SELECT * FROM users'));
$orderTask = Concurrent::spawn(fn() => $this->api->getOrders());
$emailTask = Concurrent::spawn(fn() => $this->mailer->sendBulk());
// All three run concurrently – wait for all of them
[$users, $orders, $emails] = Concurrent::all([$userTask, $orderTask, $emailTask]);
All methods are static and fully re-entrant – you can run multiple independent schedulers in different Fibers.
Blocking I/O functions (file_get_contents, PDO::query, curl_exec) do not yield – use non-blocking alternatives or wrap them in a custom Fiber-aware adapter.
Concurrent is a solid foundation for modern, high-performance PHP. Drop it into any 8.1+ project and start parallelizing I/O-bound work today.
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | |||||||
| 0% |
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.