Why compile a PHP File? Why compile a PHP File? php php

Why compile a PHP File?


While PHP code needs to be interpreted on every call, bytecode is precompiled code that runs almost instantly.Mostly you will only really need it, if you are running a larger website.

The following tools can be used to compile scripts or run compiled scripts:


Unless you're after serious performance then compiling PHP using something like Facebook's HipHop is probably a bit excessive.

I'd just install/configure Alternative PHP Cache (APC) on your machine which will cache the compiled bytecode and should give you an instant performance boost.


Facebook use such things. Their product is hiphop, and it's free.