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.
php-ng. It's already merged into the master branch and is confirmed to be in PHP 7 (there won't be a PHP 6). Maybe you also like a simplephar?