There is a PECL extension that provides Event and EventBase classes that can work with several things, as well as with epoll .
See: http://www.php.net/manual/en/event.examples.php
Sorry, I canβt provide a sample other than the one you will find in the link, because I have not worked with this yet.
The EventBase class represents the basic structure of the libevent event. It contains a set of events and can interrogate to determine which events are active.
Each event base has a method or backend that it uses to determine which events are ready. Recognized methods are: selection, polling, epoll, kqueue, devpoll, evport and win32.
To configure the event base to use, or to avoid the specific backend of the EventConfig class.
DanFromGermany
source share