Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fibers are incredibly powerful, as they can be used to implement seamless go-like concurrency with async, colorless functions.

They were added to PHP by the maintainers of amphp (https://amphp.org), which is the best library for async PHP out there, providing a clean, object-oriented and async API for files, databases and everything that can make use of async I/O.



A fiber is a colored function. It's a different color than an async function, but it's not blindly swapable for a regular function.


Async functions based on PHP fibers are explicitly uncolored, they do not require any special keywords to be invoked, and are explicitly swappable with any regular functions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: