Re: [RFC] Extension Prepend Files
| From: | Benjamin Eberlei | Date: | Sun, 11 Jan 2015 09:56:33 +0000 |
| Subject: | Re: [RFC] Extension Prepend Files | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80364@lists.php.net to get a copy of this message | ||
On Sat, Jan 10, 2015 at 9:16 AM, Pierre Joye <pierre.php@gmail.com> wrote:
> On Sun, Jan 4, 2015 at 3:52 AM, Benjamin Eberlei <kontakt@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.
>
> Just for the record here:
>
> A proof of concept, IRC log, I am lazy :)
>
> <Pierre> benjamin, Derick
> https://gist.github.com/pierrejoye/ce4867a5eaabffa71df4
> https://gist.github.com/pierrejoye/0859e3702ceb3bb652b6
> https://gist.github.com/pierrejoye/544e60d8994094c55583
> <Pierre> too slow internet for a fork & PR
> <Pierre> but it works now. Add PHP_BUILTIN_SCRIPT(date,
> PHP_EXT_DIR(date)/date.php) to config.m4, and call manually
> zend_execute_script in RINIT, could be easier to do it in a register
> function, inside MINIT and let the engine do it on RINIT, actually
> cleaner, but this patch is only a prrof of concept to play with
>
Cool thanks!
Re-citing the twitter discussion this requires opcache changes and Sara
preferred having a persistent function table.
Both things are a big undertaking for this rather small feature, even
considering Sara's post about a JNI/PNI extension API.
>
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://www.libgd.org
>