Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43008 invoked from network); 10 Jan 2015 08:16:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2015 08:16:33 -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.174 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.174 mail-lb0-f174.google.com Received: from [209.85.217.174] ([209.85.217.174:53982] helo=mail-lb0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/F0-31592-FDFD0B45 for ; Sat, 10 Jan 2015 03:16:32 -0500 Received: by mail-lb0-f174.google.com with SMTP id 10so12048743lbg.5 for ; Sat, 10 Jan 2015 00:16:28 -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=SUemHkbvu7coGYfIGeOON8dgzwnmyHWfTA267ghGKtk=; b=ArbaX6WmHc5SxC2G+D4SMLcZqTMqcq2qwKjfnsLX51492+L/uHZ2RAvcISlaVUOnR9 QwxyDITkmWvDW0GNHUe2LMvcl3DMdH8nwz0c1xP9tYGfXO65rM1tJyvki7YkmDaHxqgk AzQxhChk/T+fmmbDP7DfaZzkS6X7tBP+1SPJkfYkP1nZXnDex1KbDaPHGURjBbCOCyRy 8Y7/d6dwJxuynJmsFTb5f4lBJdPR3cKDH8tKireC9qLpIuf+okY/JN9X+sz9WL2Wu2jX AxVsDUKj4u+BGxP6v2Sr16M6Fmo0Ebo2/ax3IhX1fp7GTTDbMIAjRBVhl4jcbNLBzluA KWFQ== MIME-Version: 1.0 X-Received: by 10.112.167.136 with SMTP id zo8mr26075168lbb.17.1420877788626; Sat, 10 Jan 2015 00:16:28 -0800 (PST) Received: by 10.112.154.133 with HTTP; Sat, 10 Jan 2015 00:16:28 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Jan 2015 00:16:28 -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 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 Cheers, -- Pierre @pierrejoye | http://www.libgd.org