Hi!
> https://wiki.php.net/rfc/token-get-always-tokens
>
> This should be pretty non-controversial. I hope?
No way!
Just kidding :) I think it's a great idea, token_get_all() is annoying
to deal with. We'd have to fix token_name though so that this would
still work:
foreach ($tokens as $token) {
if (is_array($token)) {
echo "Line {$token[2]}: ", token_name($token[0]), "
('{$token[1]}')", PHP_EOL;
}
}
We could, of course, do something like
$token[0]<=255?$token[0]:token_name($token[0]) - but that looks hacky.
--
Stas Malyshev
[email protected]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php