HALT Patch
| From: | Ilia Alshanetsky | Date: | Fri, 11 Mar 2005 19:36:16 +0000 |
| Subject: | HALT Patch | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-15375@lists.php.net to get a copy of this message | ||
The attach patch implements a special "token" <?php HALT; ?> 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