tags:

views:

23

answers:

1

Hello

I was browsing thru the docs of APC (Alternative PHP Cache) and I've seen that it has a function called apc_compile_file. The Docs say that this function is to:

Stores a file in the bytecode cache, bypassing all filters.

Is this like HipHop's idea, to store PHP code in more optimized code? If is not, can someone educate me because Im kinda lost in that. If is indeed like that, then why APC is older than HipHop and doesn't get all the fuzz that HipHop gets.

Best regards!

+2  A: 

The two are very, very different.

APC isn't a bytecode optimizer, just a bytecode cache. It saves the need for the PHP script to be parsed (or even read from the .php file on disk) on subsequent accesses, but it's still being executed as PHP bytecode.

HipHop doesn't just optimize PHP code, it transforms it to compilable C++ code, ten compiles it into an native executable on the server. By its nature as compiled code, it then runs significantly faster than any scripted language.

Mark Baker