PCS (PHP Code Service)

From: Date: Wed, 02 Dec 2015 21:44:39 +0000
Subject: PCS (PHP Code Service)
Groups: php.internals 
Request: Send a blank email to internals+get-89525@lists.php.net to get a copy of this message
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

« previous php.internals (#89525) next »