Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80147 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89070 invoked from network); 4 Jan 2015 13:11:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2015 13:11:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=reeze.xia@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=reeze.xia@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.174 as permitted sender) X-PHP-List-Original-Sender: reeze.xia@gmail.com X-Host-Fingerprint: 74.125.82.174 mail-we0-f174.google.com Received: from [74.125.82.174] ([74.125.82.174:63605] helo=mail-we0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/61-15455-EFB39A45 for ; Sun, 04 Jan 2015 08:11:27 -0500 Received: by mail-we0-f174.google.com with SMTP id k48so6511926wev.19 for ; Sun, 04 Jan 2015 05:11:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=29NGcvlYl5zrn/Xc+e6xGNX1Jr2UDt9/VZyiMswl9GU=; b=coeAPRcB+suZvUQqqhKgcaU/Ols7rO49CFDvjmoCgieHQSBuBqhVHke7pn98lpxpHm GFzTH6trK5py0bArMWy9FAOlEstOMoBQa67Tzrptuvai+nUkYAo3OuaPakk3bSdQHl3H tbgG8XAcLMD13WKWZv9xaAXZXur0Kg2ENNHQS/0WjA6C85E6IyT5RTfcPhKpvoAAHLll ECWGGLnq9dUcnlzjwBB7uW4T0k2bFFETZfaht0lFOkCQ7N3NAhf64T6nONShbdUEZ43K D+uDdlIhYK4BYMI6Hp97sd1k0U33eXUSEwi8QvGw6OVMi5QSIjm1yY1lueGT4KWXgAlW lqJw== X-Received: by 10.180.72.199 with SMTP id f7mr15988104wiv.53.1420377083314; Sun, 04 Jan 2015 05:11:23 -0800 (PST) MIME-Version: 1.0 Sender: reeze.xia@gmail.com Received: by 10.194.79.104 with HTTP; Sun, 4 Jan 2015 05:11:03 -0800 (PST) In-Reply-To: References: Date: Sun, 4 Jan 2015 21:11:03 +0800 X-Google-Sender-Auth: VpdoxkKV_Dh85RmwYXEJOsoduW4 Message-ID: To: Benjamin Eberlei Cc: PHP Internals Content-Type: multipart/alternative; boundary=f46d0434c0ba7f8844050bd34f0c Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: reeze@php.net (reeze) --f46d0434c0ba7f8844050bd34f0c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Benjanmin, I didn't try to cache opcode myself, I try it before, but I think it should be done by opcaches (avoid duplication and opcache will optimize the compiled opcode), so I use the method @Fran=E7ois mentioned, I use a stream wrapper to take advantage of opcaches. there is a problem opcache didn't allow streams except `file://` and `phar://`, @Fran=E7ois created a RFC to support it [1], if that was accepted, it should work with full speed :) -- [1] https://github.com/php/php-src/pull/976/files On 4 January 2015 at 21:02, Benjamin Eberlei wrote: > Hey reeze, > > This looks like a fantastic approach. Can you explain how you compile the > PHP code into the Shared Object? The README doesnt explain much. > > greetings > Benjamin > > On Sun, Jan 4, 2015 at 1:33 PM, reeze wrote: > >> I like the idea, I have implemented a util [1] to help writing extension= s >> with PHP, I try the approach HHVM adopted by embedding PHP scripts to th= e >> binary file of extension, maybe it is what you want. I do like it been >> supported in core. I would like to implement the RFC if others like it. >> >> --- >> [1] https://github.com/reeze/php-ext-embed >> >> >> On 4 January 2015 at 19:52, 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. >>> >>> greetings >>> Benjamin >>> >> >> > --f46d0434c0ba7f8844050bd34f0c--