Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89525 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31591 invoked from network); 2 Dec 2015 21:44:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2015 21:44:46 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:46164] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/22-02398-C466F565 for ; Wed, 02 Dec 2015 16:44:44 -0500 Received: from [127.0.0.1] (unknown [82.240.16.115]) (Authenticated sender: flaupretre@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id C070F4B0009 for ; Wed, 2 Dec 2015 22:43:52 +0100 (CET) To: Internals Message-ID: <565F6647.1080602@php.net> Date: Wed, 2 Dec 2015 22:44:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 151202-1, 02/12/2015), Outbound message X-Antivirus-Status: Clean Subject: PCS (PHP Code Service) From: francois@php.net (=?UTF-8?Q?Fran=c3=a7ois_Laupretre?=) Hi, I'd like to open a discussion about a new PHP extension named PCS. PCS stands for 'PHP Code Service' and it is (yet) another way to mix C and PHP code in extensions. Some months ago (January 2015), we had come to the conclusion that two issues needed to be solved : allow the PHP code to be opcache-d, and avoid loading every script at RINIT. PCS proposes a solution for both via a stream wrapper and an autoloader. During this discussion, it also became clear that two different sources of PHP scripts should be supported : some want to embed and distribute scripts in the compiled module, and others want to store them in a separate location on the host. So, PCS supports both architectures or even a mix of both. The documentation is available at http://pcs.tekwire.net : - the 'Introduction' document details the pros and cons of the different approaches, - and a tutorial describes in details how to embed the MongoDB PHP library in the MongoDB C extension. If this discussion results in a positive consensus, and because PCS may potentially be used to rewrite parts of core extensions from C to PHP, I'll write an RFC proposing to include it in the 7.1 core distrib. Note : don't use the 'pecl install' command to get PCS, download from PECL. I still need to find a workaround for the 'pecl' command bug. Regards François