PHP + Coroutine + Promise
In PHP, we will use more or less to the asynchronous programming, but it brings us a callback asynchronous programming hell feeling, and the code readability is very poor, in the ES6 specification, or earlier can launch a Promise something, you can use Promise to implement asynchronous synchronous approach the operation, code readability greatly improved, not only that, due to the mixing of asynchronous programming and asynchronous IO use, cause it is difficult to improve the accuracy of code, it is undeniable that the introduction of Promise, greatly improves the reliability of the code you write asynchronous, although this is the loss of some very small performance, but any the choice is relative.
promise->then
primise->catch
Promise::all
Promise::race
Promise::resolve
Promise::reject
Promise::warp
Promise::co
more