Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15377 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40220 invoked by uid 1010); 11 Mar 2005 20:23:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40205 invoked from network); 11 Mar 2005 20:23:27 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 11 Mar 2005 20:23:27 -0000 X-Host-Fingerprint: 167.206.4.196 mta1.srv.hcvlny.cv.net NetCache Data OnTap 5.x Received: from ([167.206.4.196:35731] helo=mta1.srv.hcvlny.cv.net) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id F2/0E-31540-E3EF1324 for ; Fri, 11 Mar 2005 15:23:26 -0500 Received: from [192.168.1.2] (ool-44c7569b.dyn.optonline.net [68.199.86.155]) by mta1.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0ID7006ONFB64L@mta1.srv.hcvlny.cv.net> for internals@lists.php.net; Fri, 11 Mar 2005 15:23:31 -0500 (EST) Date: Fri, 11 Mar 2005 15:22:56 -0500 In-reply-to: <4231F330.6000705@prohost.org> To: Ilia Alshanetsky Cc: internals@lists.php.net Reply-to: john@coggeshall.org Message-ID: <1110572576.5778.213.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> Subject: Re: [PHP-DEV] HALT Patch From: john@coggeshall.org (John Coggeshall) We've been talking about this on IRC for awhile now and I think it's a nice patch to minimize memory usage when you want to create these sorts of "bundled" PHP/data hybrid scripts. John On Fri, 2005-03-11 at 14:36, Ilia Alshanetsky wrote: > The attach patch implements a special "token" that can be > used to stop the Zend lexical parser from parsing any data after this > token. > > The idea behind this patch is to allow tucking on of any data (binary > and otherwise) to the PHP script without having to encode it. It also > saves on memory/cpu that normally be used/needed to parse the data. > Memory is particularly important point, since many systems run with > default memory limit (8 megs) and would easily hit it when a script had > a 2-4 megs of data tacked on. > > The patch would be extremely helpful for application distribution where > the entire install/upgrade script can be just a single script. > > The syntax chosen for the patch was design specifically in such a way as > to not cause parser errors in older PHPs without the support for this > feature. > > Ilia > > ______________________________________________________________________ > Index: Zend/zend_language_scanner.l > =================================================================== > RCS file: /repository/ZendEngine2/zend_language_scanner.l,v > retrieving revision 1.124 > diff -u -a -p -r1.124 zend_language_scanner.l > --- Zend/zend_language_scanner.l 7 Mar 2005 16:48:49 -0000 1.124 > +++ Zend/zend_language_scanner.l 11 Mar 2005 19:30:47 -0000 > @@ -1342,6 +1342,10 @@ NEWLINE ("\r"|"\n"|"\r\n") > return T_INLINE_HTML; > } > > +"" { > + yyterminate(); > +} > + > "" { > HANDLE_NEWLINES(yytext, yyleng); > if (CG(short_tags) || yyleng>2) { /* yyleng>2 means it's not */ > > > ______________________________________________________________________ > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php