This project implements a cooperative task scheduler using coroutines. The implementation is described in this blog post.
To try it out you will need a recent PHP 5.5 build (newer than alpha 2). Otherwise some parts like exception handling will not work.
Maybe I will develop this a bit further so it becomes actually usable.