On Jan 5, 2015 10:41 PM, "Benjamin Eberlei" <kont...@beberlei.de> wrote:
>
>
> On Mon, Jan 5, 2015 at 3:02 PM, Pierre Joye <pierre....@gmail.com> wrote:
>>
>> Hi,
>>
>> On Jan 4, 2015 6:52 PM, "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.
>>
>> I understand the idea however I wonder what are the gains for the user?
On any case the file has to be at the right place, etc.
>
> The shared object file has to be at the right place as well.

Make install, build dependent. Include paths are runtime dependent. It
makes a slight bigger difference.

>>
>> Also as it is internals only, it could be nicer to expose the prepend
config using the existing directive with options like first, before, last
for the insert position.
>
> This assumes that we have dependencies between extensions, which we don't
have anyways. Now if extensions depend on each other the order is
important. I assume that the loading order is also the order that the MINIT
is called, which then would also put dependent php files in order.
>
>>
>> While being at it, a similar feature can be added to auto prepend/append
as it can be very useful in user land as well.
>
> Yes maybe, although I don't see the benefit for userland TBH, compared to
extensions. Extensions are about declaring functions/classes, prepend is
normally about actually "executing"/running code.

Not always really. But the two are so similar than I have some hard time to
see why it should be different. Feel free to enlighten me :)

Cheers,
Pierre

Reply via email to