Hi Benjanmin, I didn't try to cache opcode myself, I try it before, but I think it should be done by opcaches (avoid duplication and opcache will optimize the compiled opcode), so I use the method @François mentioned, I use a stream wrapper to take advantage of opcaches. there is a problem opcache didn't allow streams except `file://` and `phar://`, @François created a RFC to support it [1], if that was accepted, it should work with full speed :)
-- [1] https://github.com/php/php-src/pull/976/files On 4 January 2015 at 21:02, Benjamin Eberlei <kont...@beberlei.de> wrote: > Hey reeze, > > This looks like a fantastic approach. Can you explain how you compile the > PHP code into the Shared Object? The README doesnt explain much. > > greetings > Benjamin > > On Sun, Jan 4, 2015 at 1:33 PM, reeze <re...@php.net> wrote: > >> I like the idea, I have implemented a util [1] to help writing extensions >> with PHP, I try the approach HHVM adopted by embedding PHP scripts to the >> binary file of extension, maybe it is what you want. I do like it been >> supported in core. I would like to implement the RFC if others like it. >> >> --- >> [1] https://github.com/reeze/php-ext-embed >> >> >> On 4 January 2015 at 19:52, Benjamin Eberlei <kont...@beberlei.de> wrote: >> >>> Hey everyone, >>> >>> I want to open discussion on my RFC to strengthen the ability of >>> extensions >>> to provide functionality to developers in both C **and** PHP code. >>> >>> For this extensions can add PHP files to a list of "prepend files" that >>> are >>> part of every request execution exactly the same way the INI >>> auto_prepend_file functionality works: >>> >>> https://wiki.php.net/rfc/extension_prepend_files >>> >>> I propose implementation details in the RFC, but they are completely up >>> to >>> discussion. I am even sure there is probably a better way than what I >>> proposed, because I am not familiar with the code. >>> >>> greetings >>> Benjamin >>> >> >> >