Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80364 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64993 invoked from network); 11 Jan 2015 09:56:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 09:56:38 -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.41 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.41 mail-wg0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:38004] helo=mail-wg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/12-48183-4D842B45 for ; Sun, 11 Jan 2015 04:56:37 -0500 Received: by mail-wg0-f41.google.com with SMTP id l18so14748321wgh.0 for ; Sun, 11 Jan 2015 01:56:33 -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=VnLGiu0oRHmP9RXfd4qlTKhrnuDql2LkLaLYlJOv1/Q=; b=C1AUZExcY7fX9y+8Q3YPLTU8GLtsvCA4GmMfzIja4nQkiUaupy6ZhfyXZXBd9A0+GY 9P7gG/ZNJQ4+fbLFJ5vMjkDtgqpnqXiHucByC/UpQ9grzPNdkeUGuuI/+LZpuJcGxDFs 0iQa0hQQaOLJyGDz2U/9SMCU8obiAtBZqrAv5K0xxkxyW5BuH1RGDUiq5qg3bH0GVSN4 glUVMX7NsQwe5A6rYv8KkizR+Gpb/m0nPVdYRZ2HVEayBJPc0p9Bpks9e+4dU3L85Hux 0q+tc+7Krkna/+kdQ6716w09oB77MoVuggReFKrsKf6CLrKqmikVSI4ZK7oy33LPRarI lJ7A== X-Gm-Message-State: ALoCoQkvrrJW+9zoOvkyEeQtTY44jkxKRDe8sM4WVnM/6uSk3pMjvAbk2tjs4lQ80H9OY7lWV5np MIME-Version: 1.0 X-Received: by 10.194.86.135 with SMTP id p7mr48173028wjz.89.1420970193407; Sun, 11 Jan 2015 01:56:33 -0800 (PST) Received: by 10.194.57.73 with HTTP; Sun, 11 Jan 2015 01:56:33 -0800 (PST) X-Originating-IP: [77.13.193.204] In-Reply-To: References: Date: Sun, 11 Jan 2015 10:56:33 +0100 Message-ID: To: Pierre Joye Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e0102e4989d70b8050c5d67c3 Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: kontakt@beberlei.de (Benjamin Eberlei) --089e0102e4989d70b8050c5d67c3 Content-Type: text/plain; charset=UTF-8 On Sat, Jan 10, 2015 at 9: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 > 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 > --089e0102e4989d70b8050c5d67c3--