RePHP
Requirements
- PHP5.5+
Install
The recommended way to install react is through composer.
{
"repositories": [
{ "type": "vcs", "url": "http://github.com/Imunhatep/rephp" }
],
"require": {
"imunhatep/rephp": "@dev"
}
}
What is it?
Generally this is project is a try to REview how we use PHP. It's based on PHP Coroutine server, mostly written by nikic, Cooperative-multitasking-using-coroutines-in-PHP. The goal is to make HTTP server like nginx to connect directly to PHP Http server based on ReactPHP. This approach is described by Marc, php-high-performance.
But, react works by eventloop principle either that libevent or simply socket_select loop. What's uniq in this project is that I try to implement coroutine event loop from nikic coroutine implementation to React core. And make this work as Http server in the way Marc described it.
This will allow to use ReactPHP packages like Ratchet websockets server. For Web application framework Symfony2 will be used.
How to start?
Http server:
./bin/rephp rephp:httpserver localhost 8080
WebSocket server:
./bin/rephp rephp:wsserver localhost 8089
For web sockets you will need manually install Ratchet. I will implement Ratchet a little bit later.
Article on the subject with howto (on russian):
License
The code for RePHP is distributed under the terms of the GPLv3 license.