Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99403 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19668 invoked from network); 6 Jun 2017 15:52:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2017 15:52:21 -0000 Authentication-Results: pb1.pair.com header.from=php@dennis.birkholz.biz; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dennis@birkholz.biz; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain birkholz.biz designates 144.76.185.232 as permitted sender) X-PHP-List-Original-Sender: dennis@birkholz.biz X-Host-Fingerprint: 144.76.185.232 yukon.nexxes.net Received: from [144.76.185.232] ([144.76.185.232:35785] helo=mx01.nexxes.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/D0-27119-1BFC6395 for ; Tue, 06 Jun 2017 11:52:20 -0400 Received: from [192.168.178.26] (xdsl-78-34-217-16.netcologne.de [78.34.217.16]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: dennis@birkholz.biz) by mx01.nexxes.net (Postfix) with ESMTPSA id 2E8774824E6 for ; Tue, 6 Jun 2017 17:52:15 +0200 (CEST) To: internals@lists.php.net References: <5313411f-40b4-58c6-83a8-7e813526f2a7@tekwire.net> Message-ID: Date: Tue, 6 Jun 2017 17:52:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Proposing inclusion of PCS in the 7.2 core distribution From: php@dennis.birkholz.biz (Dennis Birkholz) Hi together, Am 06.06.2017 um 14:43 schrieb Nikita Popov: > First of all: I think the ability to implement parts of PHP extensions in > PHP is extremely important and will be a game changer in our ability to > maintain and improve our standard library. I agree with you here 100%. > 1. As far as I understand, PCS relies on autoloading. There are two issues > here: First, autoloading does not register symbols prior to autoloading. > This means that functions like get_defined_classes() will not behave as > expected. Second, autoloading does not support functions. I think both of > these problems can be solved with some up-front symbol analysis. Lazily > compiling internal functions should not run into any of the problems we > have with userland function autoloading. (disclaimer: I have not deep knowledge how the core really works) From what I see there is a difference between writing extension code in PHP and placing that plain PHP files somewhere when installing. So I would argue when compiling the extension or the core, all these PHP extension stuff should get compiled to OpCodes and put in a segment of the resulting binary. The OpCache could then be modified to allow it to use the OpCodes from these read-only segments (one for the core, one optionally for each extension). That would void the problems you mentioned above, but maybe I am missing how the OpCache and symbol registration work in PHP. Greets Dennis