Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

react

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

Subscribe to updates I use react


Statistics on react

Number of watchers on Github 5924
Number of open issues 6
Average time to close an issue 5 months
Main language PHP
Average time to merge a PR 11 days
Open pull requests 4+
Closed pull requests 36+
Last commit over 1 year ago
Repo Created over 7 years ago
Repo Last Updated over 1 year ago
Size 1.29 MB
Homepage https://reactphp.org
Organization / Authorreactphp
Latest Releasev0.4.2
Contributors27
Page Updated
Do you use react? Leave a review!
View open issues (6)
View react activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating react for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)
ReactPHP Logo


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


Build Status


ReactPHP is a low-level library for event-driven programming in PHP. At its core is an event loop, on top of which it provides low-level utilities, such as: Streams abstraction, async dns resolver, network client/server, http client/server, interaction with processes. Third-party libraries can use these components to create async network clients/servers and more.

The event loop is based on the reactor pattern (hence the name) and strongly inspired by libraries such as EventMachine (Ruby), Twisted (Python) and Node.js (V8).

Design goals

  • Usable with a bare minimum of PHP extensions, add more extensions to get better performance.
  • Provide a standalone event-loop component that can be re-used by other libraries.
  • Decouple parts so they can be replaced by alternate implementations.

ReactPHP is non-blocking by default. Use workers for blocking I/O.

Core Components

Network Components

  • Socket Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP. Read the documentation

  • Datagram Event-driven UDP client and server sockets for ReactPHP. Read the documentation

Protocol Components

Utility Components

Getting started

ReactPHP consists of individual components. This means that instead of installing something like a ReactPHP framework, you actually pick only the components that you need.

The recommended way to install these components is through Composer. New to Composer?

For example, this may look something like this:

$ composer require react/event-loop react/http

For more details, check out ReactPHP's homepage for quickstart examples and usage details.

Documentation

Superficial documentation can be found in the README files of the individual components. See vendor/react/*/src/README.md.

Community

Check out #reactphp on irc.freenode.net. Also follow @reactphp on twitter.

Tests

To run the test suite, you first need to clone this repo and then install all dependencies through Composer:

$ composer install

To run the test suite, go to the project root and run:

$ php vendor/bin/phpunit

License

MIT, see LICENSE.

react open issues Ask a question     (View All Issues)
  • about 3 years [FYI] New homepage and logo
  • about 3 years async-interop compatibility
  • about 3 years PHPUnit Tests
  • about 3 years [RFC] Separate contracts from implementation
  • about 3 years Tag components considered stable as 1.0
  • about 3 years PHP Version requirement
  • about 3 years Mark react/react as abondoned in order to redirect people to new components
  • about 3 years Update readme to describe the role of this (meta) repository
  • over 3 years [RFC] Remove branch-alias definitions
  • over 4 years [RFC] Consider adding functional API
  • over 4 years A mailing list or subreddit for React
  • over 4 years Is there a meaningful extension system in React? Is it at all documented?
  • over 5 years HHVM hacklang `async` and `await` keywords on the roadmap
  • about 6 years Namespace amalgamation
  • over 6 years Consistent addressing scheme
  • over 6 years Socket tests for each loop implementation
  • over 6 years [SocketClent] Connector::create() should return a Connection instance and provide getRemoteAddress()
  • over 6 years Integrate mem leak tests in test suite
  • over 6 years Track performance
  • over 6 years [HttpClient] Chunked transfer-encoding
  • over 6 years Look into node streams2
  • over 6 years Make DNS resolution part of Connector optional
  • over 6 years Investigate adopting Ardent streams as a replacement for react/stream
  • over 6 years DNS resolver should use async connect
  • over 6 years Can add ev support ?
  • almost 7 years Replace exceptions with error events
  • almost 7 years Check the $except arg in stream_select
  • almost 7 years PHP 5.5 generators
  • almost 7 years [Http] Upgrade event
  • almost 7 years Libevent does not like file streams on linux
react open pull requests (View All Pulls)
  • updated README
  • Saving some memory for echo.
  • [WIP] Update dependencies to fix test timeouts on Travis
  • Update .travis.yml
react questions on Stackoverflow (View All Questions)
  • React-Native: Module AppRegistry is not a registered callable module
  • React-Native passing props without using navigator?
  • Running a predefined function in NavigatorIOS React Native
  • React Flux Webpack
  • Adding material ui to a React Component
  • React in WebPack
  • integrate flow checking into react-slingshot
  • Webpack not loading SCSS with react-toolbox
  • JavaScript React event gets weirdly fired
  • React Native : target with hash string 'android-X' not found
  • react-router v2 will not transition using context.router.replace
  • Using Browserify to create React Bundle
  • Structuring the store of a localized react / redux app
  • React - Issue with syntax
  • When I learn the first react-native demo,react-native error
  • Should component writes into store in React js app?
  • Pop to previous scene using React-Native-Scrollable-Tab-View
  • iron-meteor does not recognize react?
  • Errors when integrating reactive-record with react-rails
  • UI Components library for react native
  • How to get select element's value in react-bootstrap?
  • Using Babelify to compile React results in React Router being undefined
  • React Native iOS NavigatorIOS title font
  • Update react component without parent outside of it
  • Resetting state causing issues with React mixin
  • Dismiss Keyboard React-Native
  • React-Native and playing music from the Soundcloud API?
  • Codepush React-Native android staging release
  • Accessing React Elements (not components) for re-rendering
  • Pass DOM Element as a prop in React
react list of languages used
react latest release notes
v0.4.2 Real Split

The one where we remember to tag the change were the master repo pulls in all the split components.

v0.4.1 Hungry Hungry CPU

CPU starvation bug fixes and other bug fixes.

v0.4.0 Fore!
  • Feature: Added ChildProcess to run async child processes within the event loop (@jmikola)
  • Feature: [EventLoop] Added EventLoopInterface::nextTick(), implemented in all event loops (@jmalloc)
  • Feature: [EventLoop] Added EventLoopInterface::futureTick(), implemented in all event loops (@jmalloc)
  • Feature: [EventLoop] Added ExtEventLoop implementation using pecl/event (@jmalloc)
  • BC break: [HttpClient] Drop unused Response::getBody()
  • BC break: Bump minimum PHP version to PHP 5.4, remove 5.3 specific hacks
  • BC break: Remove $loop argument from HttpClient: Client, Request, Response
  • BC break: Update to React/Promise 2.0
  • BC break: Update to Evenement 2.0
  • BC break: [EventLoop] New method: EventLoopInterface::nextTick()
  • BC break: [EventLoop] New method: EventLoopInterface::futureTick()
  • Bug fix: [Dns] Properly resolve CNAME aliases
  • Dependency: Autoloading and filesystem structure now PSR-4 instead of PSR-0
Other projects in PHP