Build a Superfast PHP Server in Minutes with Icicle
Category: Async, async functions, asynchronous, BrunoS, event loops, icicle, league, Libraries, OOPHP, Patterns and Practices, Performance, Performance & Scaling, PHP, phpleague, server
Event-based programming is a strange topic for PHP developers. In a language as procedural; events are little more than function calls. Nothing happens between events, and all meaningful code is still blocking.
Languages like JavaScript show us what PHP could be like if event loops were at the center. Some folks have taken these insights and coded them into event loops and HTTP servers. Today we’re going to create an HTTP server, in PHP. We’ll connect it to Apache to serve static files quickly. Everything else will pass through our PHP HTTP server, based on Icicle.
You can find the example code at https://github.com/sitepoint-editors/icicle-http-server
Continue reading %Build a Superfast PHP Server in Minutes with Icicle%
LEAVE A REPLY
You must be logged in to post a comment.