Having ploughed through writing my upcoming article for PHP Magazine on “Farming PHP” I am still motivated to think deeply about PHP in the enterprise and, specifically, under high volumes of web traffic. Having come through several industries in a variety of capacities where PHP is being used effectively for business-critical operations, I am used to responding to concerns about PHP in the enterprise. The one that I am planning to tackle in my next article is that, “PHP runs heavy.”
Dealing with this consideration really comes down to three points:
- Optimizing–both the source code and through encoders like apc, IonCube, and Zend Encoder
- Caching–using output buffering, Smarty, Cache_Lite and other techniques
- Staticizing–periodically outputting static assets to serve up using lightweight systems like thttpd
Armed with a solid benchmarking tool like ab, these three principles comprise a solid foundation for running PHP in the enterprise for very high volume sites. I look forward to fleshing these ideas out in the coming days and responding to your feedback about high performance PHP in the enterprise.