Re: Revert Tokenizer behavior for 5.4
| From: | Nikita Popov | Date: | Fri, 09 Sep 2011 17:39:03 +0000 |
| Subject: | Re: Revert Tokenizer behavior for 5.4 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-55341@lists.php.net to get a copy of this message | ||
On Fri, Sep 9, 2011 at 10:46 AM, Nicolas Grekas
<nicolas.grekas+php@gmail.com> wrote:
> You can also just count the number of semantic token after T_HALT_COMPILER
> (ie excluding whitespace and comments) and once you hit 3, halt.
> [...]
> Maybe the binary data itself, as a big T_INLINE_HTML for example ?
In favor of both proposals!
Returning the next 3 tokens should be quite easy [1].
Returning the rest as an T_INLINE_HTML makes sense too, as extracting
the data is probably what you want. Though I have no idea how to
implement that ^^
[1]: https://github.com/nikic/php-src/commit/2d4cfa05947f04de447635ca5748b3b58defbfaf
(Not tested, only guessing)