Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57933 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35418 invoked from network); 22 Feb 2012 06:07:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2012 06:07:30 -0000 Authentication-Results: pb1.pair.com header.from=wgpdeepak1989@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=wgpdeepak1989@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) X-PHP-List-Original-Sender: wgpdeepak1989@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:54695] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/81-16342-126844F4 for ; Wed, 22 Feb 2012 01:07:30 -0500 Received: by dang27 with SMTP id g27so8812749dan.29 for ; Tue, 21 Feb 2012 22:07:24 -0800 (PST) Received-SPF: pass (google.com: domain of wgpdeepak1989@gmail.com designates 10.68.226.166 as permitted sender) client-ip=10.68.226.166; Authentication-Results: mr.google.com; spf=pass (google.com: domain of wgpdeepak1989@gmail.com designates 10.68.226.166 as permitted sender) smtp.mail=wgpdeepak1989@gmail.com; dkim=pass header.i=wgpdeepak1989@gmail.com Received: from mr.google.com ([10.68.226.166]) by 10.68.226.166 with SMTP id rt6mr85617416pbc.23.1329890844498 (num_hops = 1); Tue, 21 Feb 2012 22:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mjU8asZEY8/3pYYlNNhmWCohreb15K56ILOXhSMakhs=; b=D6BxgPqdOvll4t/OhsQvlQIBgd5yD9YDrNPaoSrnhKBeElNN0TMYuhzOS7XRXFTFm+ /C1q+cGbXJWtQW/FTmXsOzD3rWuOu2C9UIm7hWNTcyAiGjpvU/tzrVKBO2MDhpFpr1I2 epNeQM9QP1t4qp1fRVzJdYphs8XVfvJCA5qNw= MIME-Version: 1.0 Received: by 10.68.226.166 with SMTP id rt6mr70475258pbc.23.1329890844444; Tue, 21 Feb 2012 22:07:24 -0800 (PST) Received: by 10.68.240.101 with HTTP; Tue, 21 Feb 2012 22:07:24 -0800 (PST) In-Reply-To: <4F448356.3020008@php.net> References: <4F448356.3020008@php.net> Date: Wed, 22 Feb 2012 11:37:24 +0530 Message-ID: To: flavius@php.net Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=e89a8ff246ed5f861b04b987573d Subject: Re: [PHP-DEV] PHP Script Compile System From: wgpdeepak1989@gmail.com (Deepak Balani) --e89a8ff246ed5f861b04b987573d Content-Type: text/plain; charset=ISO-8859-1 No I mean persistent compilation system like Java HelloWorld.Java -> HelloWorld.class HelloWorld.php -> HelloWorld.gpc When you call gpc_import('HelloWorld.php'); then function first look for HelloWorld.gpc if found then include it and if not then look for HelloWorld.php or HelloWorld.inc (whatever the setting is) if found compile it and include it else raise an error. On Wed, Feb 22, 2012 at 11:25 AM, Flavius Aspra wrote: > On 02/22/2012 06:49 AM, Deepak Balani wrote: > >> Hello all, >> >> 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. >> >> gpc_import function accepting path to the compiled file and execute file >> into the zend engine. I want to know perception of you all about this. >> >> Thank you. >> Deepak Balani >> >> > Hi > > Do you mean something like apc_compile_file()? > > I think we already have it. > > Or perhaps you mean runkit? > --e89a8ff246ed5f861b04b987573d--