Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. RxPHP

RxPHP

MITPHP2.1.0

Reactive extensions for PHP enabling asynchronous and event-based programming using observable streams.

GitHubGitHub
1.7k stars141 forks0 contributors

What is RxPHP?

RxPHP is a ReactiveX implementation for PHP that provides reactive extensions for composing asynchronous and event-based programs using observable streams. It solves the problem of managing complex asynchronous data flows and event handling in PHP applications by offering a declarative and composable approach. Developers can use it to handle real-time data, user interactions, and other asynchronous operations more effectively.

Target Audience

PHP developers building applications with complex asynchronous workflows, event-driven architectures, or real-time features. It's particularly useful for those working with ReactPHP or needing to manage streams of data or events.

Value Proposition

Developers choose RxPHP because it brings the battle-tested ReactiveX paradigm to PHP, offering a consistent and powerful way to handle asynchronous programming. Its integration with ReactPHP and support for promises makes it a practical choice for modern PHP applications needing robust event and data stream management.

Overview

Reactive extensions for PHP

Use Cases

Best For

  • Handling real-time data streams in PHP applications
  • Composing complex asynchronous operations with clean, declarative code
  • Integrating event-driven architectures with ReactPHP
  • Managing user interface events in PHP-based web applications
  • Processing and transforming continuous data flows
  • Building reactive microservices or APIs in PHP

Not Ideal For

  • Projects with simple, synchronous request-response web APIs that don't involve real-time data or events
  • Teams using traditional PHP frameworks like Laravel or Symfony without async support, where integration would be cumbersome
  • Applications where minimizing external dependencies and quick setup is a higher priority than advanced async capabilities

Pros & Cons

Pros

Rich Operator Set

Includes a comprehensive range of operators like map, filter, and flatMap for manipulating observable streams, enabling complex data transformations as demonstrated in the example code.

Seamless Promise Integration

Works smoothly with ReactPHP promises, allowing easy conversion between observables and promises, as shown in the README with fromPromise() and toPromise() methods.

Declarative Async Code

Follows the ReactiveX philosophy to provide a clean, composable approach for asynchronous and event-driven programming, improving code maintainability in complex scenarios.

Built-in Error Handling

Offers mechanisms to handle errors within observable chains, such as error callbacks in subscribe(), ensuring robust asynchronous operations without manual boilerplate.

Cons

Complex Initial Setup

Requires manual configuration of a default scheduler and an external event loop like ReactPHP, adding steps beyond standard PHP setup, as noted in the installation instructions.

Steep Learning Curve

Assumes familiarity with reactive programming concepts, which can be a barrier for PHP developers accustomed to synchronous or simpler async patterns.

Limited PHP Ecosystem Fit

May not integrate easily with mainstream PHP frameworks and tools that are not designed for asynchronous event loops, potentially leading to compatibility challenges.

Frequently Asked Questions

Quick Stats

Stars1,732
Forks141
Contributors0
Open Issues7
Last commit2 months ago
CreatedSince 2016

Tags

#stream-processing#event-driven#observables#php-library#reactive-programming#asynchronous#reactivex#concurrency

Built With

P
PHP
R
ReactPHP

Included in

PHP32.5k
Auto-fetched 1 day ago

Related Projects

SwooleSwoole

🚀 Coroutine-based concurrency library for PHP

Stars18,879
Forks3,147
Last commit20 days ago
WorkermanWorkerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.

Stars11,546
Forks2,257
Last commit4 days ago
ReactPHPReactPHP

Event-driven, non-blocking I/O with PHP.

Stars9,084
Forks715
Last commit1 year ago
RatchetRatchet

Asynchronous WebSocket server

Stars6,429
Forks792
Last commit8 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub