Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10618 invoked by uid 1010); 12 Mar 2005 12:19:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 10603 invoked from network); 12 Mar 2005 12:19:44 -0000 Received: from unknown (HELO php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2005 12:19:44 -0000 X-Host-Fingerprint: 167.206.4.198 mta3.srv.hcvlny.cv.net NetCache Data OnTap 5.x Received: from ([167.206.4.198:59617] helo=mta3.srv.hcvlny.cv.net) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id A4/D8-31540-06ED2324 for ; Sat, 12 Mar 2005 07:19:44 -0500 Received: from [192.168.1.2] (ool-44c7569b.dyn.optonline.net [68.199.86.155]) by mta3.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0ID80046SNKPBJ@mta3.srv.hcvlny.cv.net> for internals@lists.php.net; Sat, 12 Mar 2005 07:19:37 -0500 (EST) Date: Sat, 12 Mar 2005 07:19:13 -0500 In-reply-to: <4232D97B.5020305@cschneid.com> To: Christian Schneider Cc: Moriyoshi Koizumi , internals@lists.php.net Reply-to: john@coggeshall.org Message-ID: <1110629952.20051.5.camel@localhost.localdomain> Organization: Coggeshall.org MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Content-type: text/plain Content-transfer-encoding: 7BIT References: <4231F330.6000705@prohost.org> <4e89b426050311134633b22b@mail.gmail.com> <4232163C.1000906@prohost.org> <4232D97B.5020305@cschneid.com> Subject: Re: [PHP-DEV] HALT Patch From: john@coggeshall.org (John Coggeshall) I think the lexer patch is good enough. John On Sat, 2005-03-12 at 06:58, Christian Schneider wrote: > Moriyoshi Koizumi wrote: > > I modified your patch so it can capture the position where the > > supposed data begins into the constant __HALT_PHP_PARSER__. > > Sounds like a good idea to me as all the manual work to guess the start > of the data look a bit kludgy to me. > > > > $fp = fopen(__FILE__, 'rb'); > > fseek($fp, __HALT_PHP_PARSER__, SEEK_SET); > > fpassthru($fp); > > ?> > > > > abc > > def > > Hmm.. I was wondering if we should go one step further and also provide > a stream to the data. If the most common usage of this construct is > going to be reading the data after __HALT_PHP_PARSER__ then we should > optimize for that case. Something like > > $data = gzdeflate(file_get_contents("php://data")); > ?> > > ... > > - Chris