Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49156 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76040 invoked from network); 29 Jul 2010 00:54:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2010 00:54:49 -0000 Authentication-Results: pb1.pair.com header.from=jbondc@openmv.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jbondc@openmv.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain openmv.com from 64.15.152.204 cause and error) X-PHP-List-Original-Sender: jbondc@openmv.com X-Host-Fingerprint: 64.15.152.204 mail.ca.gdesolutions.com Received: from [64.15.152.204] ([64.15.152.204:64011] helo=mail.ca.gdesolutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/97-21430-451D05C4 for ; Wed, 28 Jul 2010 20:54:47 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 2D8735CFD for ; Wed, 28 Jul 2010 20:54:42 -0400 (EDT) X-Virus-Scanned: amavisd-new at gdesolutions.com Received: from mail.ca.gdesolutions.com ([127.0.0.1]) by localhost (mail.ca.gdesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ve0FiId3M1fh for ; Wed, 28 Jul 2010 20:54:41 -0400 (EDT) Received: from djbondc (modemcable083.208-56-74.mc.videotron.ca [74.56.208.83]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 9E4105C57 for ; Wed, 28 Jul 2010 20:54:41 -0400 (EDT) To: Date: Wed, 28 Jul 2010 20:54:40 -0400 Message-ID: <001e01cb2eb8$a0928c50$e1b7a4f0$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001F_01CB2E97.1980EC50" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsuuJ9V1dWjexgNTre4B7MBqWEzmA== Content-Language: en-ca Subject: Zend Extension - zend_compile_file - interoperability? From: jbondc@openmv.com ("Jonathan Bond-Caron") ------=_NextPart_000_001F_01CB2E97.1980EC50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I've starting playing around with the zend engine, is there any hope / plans for better interoperability with how zend_compile_file() should be extended? The goal being to reduce the amount of "X is not compatible with Y". It would be possible to separate extensions in two categories and provide hooks (without breaking BC): # Bytecode loaders / optimizers / dumpers (zend optimizer, ioncube loader, vld, etc.) HOOKS: zend_compile_file, zend_compile_string, zend_execute # Bytecode cache (apc, xcache, etc.) HOOKS: zend_opc_get, zend_opc_put Internally (Zend/zend.c, ext/phar/phar.c, ext/spl/php_spl.c, etc..) use zend_opc_compile_file() ~ zend_op_array * opc _compile_file(zend_file_handle *file_handle, int lifetime, int type TSRMLS_DC) { zend_op_array *retval=NULL; if( zend_opc_get(file_handle->filename, retval) ) return retval; retval = zend_compile_file(file_handle, type); zend_opc_put(file_handle->filename, lifetime, retval); return retval; } zend_opc_get() and zend_opc_put() would just be stub functions that do nothing, op code caches would change these methods If there's positive feedback, I can turn this into a RFC and put more work into it ------=_NextPart_000_001F_01CB2E97.1980EC50--