PHP is by far the most popular scripting language for dynamic web pages but it is not the most efficient language. Each time a PHP page is accessed it has to be:
- Parsed by the interpreter
- Converted into intermediary format called opcode
- Converted into machine code for your server's CPU to execute it
If the same script is accessed 100 times these steps are repeated a 100 times. To avoid this repetition and waste of server resources you can use the Alternative PHP Cache or APC.
APC is a PECL extension that caches frequently accessed PHP files code in opcode format for faster execution thereby reducing CPU load on your web server. In this guide I write about how to install and configure APC.