Re: Obscure token name
| From: | Johannes Schlüter | Date: | Wed, 28 Apr 2010 14:27:41 +0000 |
| Subject: | Re: Obscure token name | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48122@lists.php.net to get a copy of this message | ||
On Mon, 2010-04-26 at 16:32 +0200, mathieu.suen wrote:
> I am wondering why is the token name so incomprehensible ?
> Like T_PAAMAYIM_NEKUDOTAYIM...
I don't mind if we change the name in the error message. Seems to be an
issue for some ... but I think you have to look it (quickly) up the
first time you stumble over it and then remember it so it shouldn't be a
tooo big issue.
If you fear typing it: The tokenizer extension already provides
T_DOUBLE_COLON as synonym :-)
php> $t=token_get_all("<?::"); // Token 0: <? Token 1: ::
php> var_dump($t[1][0] == T_DOUBLE_COLON && $t[1][0] == T_PAAMAYIM_NEKUDOTAYIM);
bool(true)
johannes