Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80273 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38723 invoked from network); 8 Jan 2015 11:48:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2015 11:48:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.42 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:58925] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/B2-21915-57E6EA45 for ; Thu, 08 Jan 2015 06:48:05 -0500 Received: by mail-wg0-f42.google.com with SMTP id k14so2130263wgh.1 for ; Thu, 08 Jan 2015 03:48:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NDbFi+rTVFG6RpU+5gxxXTvjn99tnSIdKNCOwiAso9g=; b=R7+0NhYBBAuOV4gjGZ5d71JliLDeLey7CtBnTWWnMICjeKq5M1NjUe9y1szZWrcDWq aYQQzpsX33yH0R+2gmIBrPlpoAfCXC/4cajS5sN6fHlGOmRBvFWQo+aiGHkS6lcfiQag r9Hq6ZcGAg7BJadW1y8DXX9VY7VTh8er0uIE/YxmP/8XAxo7uV7uvl6RHIgSPZQsr8Ed G9LpCSH596sfXHT+Geplr1UPNiiQi8s7pfILj9+4RPvBMgbFd/9HtxPmezYr0BErnt5y r+obcxPaRqirQgWCgNWZhDYGbcRmbCd7HyY2/qrB6Lo/w35usgsIGcfFzUzzorQULmvi vWWQ== X-Gm-Message-State: ALoCoQlU8B2QMuMGIS2e/HgQ8K1UHlXMvrM5wRXAc/fF06hQwwoqAm5GkLoN0KZ3f/jIvk/XQbND MIME-Version: 1.0 X-Received: by 10.180.75.199 with SMTP id e7mr59918593wiw.21.1420717673961; Thu, 08 Jan 2015 03:47:53 -0800 (PST) Received: by 10.194.57.73 with HTTP; Thu, 8 Jan 2015 03:47:53 -0800 (PST) X-Originating-IP: [77.180.19.30] In-Reply-To: References: <54AAF98B.4020709@gmail.com> <001b01d029bb$fa687fc0$ef397f40$@tekwire.net> <00a201d02ac7$406a4830$c13ed890$@tekwire.net> Date: Thu, 8 Jan 2015 12:47:53 +0100 Message-ID: To: Pierre Joye Cc: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , Derick Rethans , PHP internals , Sara Golemon , Stanislav Malyshev Content-Type: multipart/alternative; boundary=f46d043895774866d0050c229c28 Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: kontakt@beberlei.de (Benjamin Eberlei) --f46d043895774866d0050c229c28 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You are not forced to use the glue code, its just always available. That is what an extension is about, always available code. An option would of course be to not use the extension if you don't need it. Developers can feel free to use the low level API just like PHP also ships high and low level stream functions for example. On Thu, Jan 8, 2015 at 12:43 PM, Pierre Joye wrote: > hi, > > On Thu, Jan 8, 2015 at 3:41 AM, Benjamin Eberlei > wrote: > > > > > > On Wed, Jan 7, 2015 at 11:14 PM, Fran=C3=A7ois Laupretre < > francois@tekwire.net> > > wrote: > >> > >> > De : Pierre Joye [mailto:pierre.php@gmail.com] > >> > > >> > ... here, > >> > it is proposed to bundle scripts that will be executed at runtime li= ke > >> > any > >> > other script, except that nothing can be done with them, not even > >> > disable > >> > them if not required (like using its own glue codes). > >> > >> I agree. Bundling scripts in extensions to execute them at each RINIT > is, > >> IMO, not a good idea (mostly for performance reasons and lack of > control, as > >> you note), but I keep thinking that a mechanism to embed PHP scripts i= n > >> extensions and make them available via a common stream wrapper can be > >> useful. What I don't like is the fact to execute them automatically at > every > >> RINIT. I prefer to let the extension free to load its PHP code when it= s > >> logic decides it is needed. > > > > > > To be honest, I don't see the use case of shipping optional PHP code > inside > > an extension. As the user of an extension I want all the > functions/classes > > to be available all the time, no matter if the extension developer wrot= e > > everything in C or in PHP. > > > > For optional code there is Composer/PEAR/php include path, this is > already a > > solved problem. > > So you are saying that people should be forced to use your glue code > instead of implementing their own when it fits better? I can only > disagree. But even then, it does not make the bundling of php code in > binaries a smart idea. > > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org > --f46d043895774866d0050c229c28--