Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57936 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57338 invoked from network); 22 Feb 2012 07:32:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2012 07:32:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.113 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.113 smtp113.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.113] ([207.97.245.113:56762] helo=smtp113.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/40-53903-02A944F4 for ; Wed, 22 Feb 2012 02:32:50 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp51.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 44ED220766; Wed, 22 Feb 2012 02:32:43 -0500 (EST) X-Virus-Scanned: OK Received: by smtp51.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id D8D062073C; Wed, 22 Feb 2012 02:32:42 -0500 (EST) Message-ID: <4F449A1A.6000203@sugarcrm.com> Date: Tue, 21 Feb 2012 23:32:42 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 MIME-Version: 1.0 To: Deepak Balani CC: "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP Script Compile System From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I am think(actually drafting) about the compilation system of PHP scripts. > I want to make a native C extension which is able to compile the scripts in > the Zend Engines opcodes and execute directly when called. > > The extension may have two functions. > > bool gpc_compile($source, $target): compile file to opcodes. > mixed gpc_import($target) Include file to current script. Just FYI: such products already exist. Besides APC that was mentioned, there's Zend Guard (commercial), ioncube encoder (commercial), bcompiler and maybe more. Out of curiosity - why you want to do this? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227