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__; ?>
...

I would suggest keeping such implementation in the user-land code rather then the core. It would be fairly trivial to implement a streams wrapper to do this and it can internally handle various decoding schema like decompression etc...


Ilia

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



Reply via email to