Question

Considering we doesn't to provide the source code to the customer (by any reason) regarding ZendGuard or Ion Cube which is used, i also heard about the HipHop which compiles php codes into java byte codes.

So do you think if it is right solution to use HHVM just compile my codes into byte codes then remove php files and everything work just fine?

I used codeignter which i saw 100% compatibility with HHVM in it's website.

Was it helpful?

Solution

HipHop expects the PHP source. You cannot remove the source files.

It is not a byte code compiler and should not be compared to Java's redistributable bytecode. HipHop is a runtime environment where PHP is JIT accelerated.

PHP is a dynamic typed language, so it's difficult to generate efficient machine code. HipHop observes the execution paths of PHP scripts over a period of time and makes a pretty good guess. You could turn on Authoritative mode, so that the file is read in once, and never expect to be changed. Even so, the JIT needs to be warmed up.

If you want to deliver a bytecode format of PHP, use a OpCache product instead of HHVM. But it's just not the same.

OTHER TIPS

HipHop expects the PHP source. You cannot remove the source files. It is not a byte code compiler and should not be compared to Java's redistributable bytecode.

You do can tell it to byte code compile PHP files to a SQLite file.

https://github.com/facebook/hhvm/wiki/Running-PHP-programs-with-HHVM#using-repoauthoritative-mode

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top