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.
> 
> > <?php
> > $fp = fopen(__FILE__, 'rb');
> > fseek($fp, __HALT_PHP_PARSER__, SEEK_SET);
> > fpassthru($fp);
> > ?>
> > <?php __HALT_PHP_PARSER__; ?>
> > 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
> 
> <?php
> $data = gzdeflate(file_get_contents("php://data"));
> ?>
> <?php __DATA__; ?>
> ...
> 
> - Chris

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to