質問

I've been searching a way to compile PHP source code and using it in a PHP script by loading the compiled code. No resultat yet, a small try using bcompiler but it's not compiling due to changes on the Zend core API, maybe small parts need to be replaced.

Other try with no success was using phpc, the version recommend for the compiler is PHP 5.2, so the API no longer supports changes to 5.4.

役に立ちましたか?

解決

bcompiler works up to PHP 5.3. I'm currently using it and I can't upgrade to PHP 5.4 now because it isn't supported.

Here is the patch to get it working on Ubuntu 12.04 with the Suhosin patch.

他のヒント

Roadsend Raven might be an alternative to phpc

I believe Facebook Hiphop's function is to compile PHP into C++ so it might be worth checking out... https://github.com/facebook/hiphop-php/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top