I just want to know is whether there is any reason/story behind to use T_
before parse errors like
parse error : unexpected `T_`ELSE in ... blah blah blah
parse error : Unexpected `T_`IF in ....blah
parse error : unexpected `T_`VAR
parse error : unexpected `T_`STRING
and many more.
Can you provide any link for clarification? Also, are there any other prefixes used in error displaying then please share.
T
stands for Token.
These errors are telling you that the parser found a token that it didn't expect.
Because those are, from the point of view of a parser, tokens
, thus the T_
(that's the same reasoning why error levels start with E_
...).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With