Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

binary code of php (compiling php)

As you know php code doesn't compile to run,they are only script. but I heard somewhere if I compile it and make it as binary code,it can be so faster and reduce pressure on server. I Google a lot to do it,but I can't find a way to do it. how can I do it?

like image 898
Moein Hosseini Avatar asked Dec 06 '22 19:12

Moein Hosseini


1 Answers

PHP compiles scripts into bytecodes, which can be cached, greatly speeding performance. Check out APC.

Here's a list of other accelerators:

http://en.wikipedia.org/wiki/List_of_PHP_accelerators

If you're looking to compile to native code, you can check out solutions like HipHop, which transforms PHP source into C++ and then compiles it with g++.

like image 194
webbiedave Avatar answered Dec 10 '22 11:12

webbiedave