Re: Obscure token name
| From: | mathieu.suen | Date: | Thu, 29 Apr 2010 11:13:00 +0000 |
| Subject: | Re: Obscure token name | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48150@lists.php.net to get a copy of this message | ||
Johannes Schlüter wrote:
On Mon, 2010-04-26 at 16:32 +0200, mathieu.suen wrote:I can google it but that is not a good way of doing things. Stefan got the right answer: "Better parser errors" --Mathieu SuenI 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 The question is that I want to understand error messages.