Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80319 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44459 invoked from network); 10 Jan 2015 08:18:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2015 08:18:19 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:34115] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/41-31592-A40E0B45 for ; Sat, 10 Jan 2015 03:18:19 -0500 Received: by mail-lb0-f173.google.com with SMTP id z12so11485632lbi.4 for ; Sat, 10 Jan 2015 00:18:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7UG2BNLggXMgPat9h5d9iiP57UxA75vSTACNI7sKyEs=; b=ulVbIJde8pKGwR+JKqyTSy4waeJv3xg1ed3DwLt/ArNLFinuCR+WbtXOR/KRYCXPCO hpKfmCzUnjydLAS1Q7Ylql733r35OOygfTzz/juGDN0jbXtG2jwWUR0aWszbXlyRuj8I fu+NmFAKistqkARkflqwGqp3TCtwB1rvkaKDUPJq6c1frlmD/Rd0tASwfb/PJOG5kSlp r+9jfpeSERyjRK5P5zYjjVBlbkY/qqLECGhWkAIPUpDOBV5ADBazGvHunoEg1nPcV+vM qqaISns+KxfHJSA5yCtqBM7CoZSBCQmkyc2L7Ek06shf4Ei6Rwkeq9NDaB+8ff/3aL77 +I7g== MIME-Version: 1.0 X-Received: by 10.112.151.4 with SMTP id um4mr26231542lbb.50.1420877895937; Sat, 10 Jan 2015 00:18:15 -0800 (PST) Received: by 10.112.154.133 with HTTP; Sat, 10 Jan 2015 00:18:15 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Jan 2015 00:18:15 -0800 Message-ID: To: Benjamin Eberlei Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: pierre.php@gmail.com (Pierre Joye) On Sat, Jan 10, 2015 at 12:16 AM, Pierre Joye wrote: > On Sun, Jan 4, 2015 at 3:52 AM, Benjamin Eberlei 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 :) > > benjamin, Derick > https://gist.github.com/pierrejoye/ce4867a5eaabffa71df4 > https://gist.github.com/pierrejoye/0859e3702ceb3bb652b6 > https://gist.github.com/pierrejoye/544e60d8994094c55583 > too slow internet for a fork & PR > 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 Also keep in mind that Sara's proposal ideas to actually tackle the real problem has my preference, over all other solutions :) -- Pierre @pierrejoye | http://www.libgd.org