I know that PHP is compiled to byte code before it is run on the server, and then that byte code can be cached so that the whole script doesn’t have to be re-interpreted with every web access.
But can you “compile” PHP code and upload a binary-ish file, which will just be run by the byte code interpreter?
After this question was asked, Facebook launched HipHop for PHP which is probably the best-tested PHP compiler to date (seeing as it ran one of the world’s 10 biggest websites). However, Facebook discontinued it in favour of HHVM, which is a virtual machine, not a compiler.
Beyond that, googling
PHP compilerturns up a number of 3rd party solutions.PeachPie
Phalanger
phc
Roadsend PHP Compiler
bcompiler
bcompiler_write_exe_footer()manual)Project Zero
Bambalam
BinaryPHP