Why do all PHP parsing errors start with "T_"?

I just want to know if there is any reason / history 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 others.

Can you provide any link for clarification? In addition, are there any other prefixes used to display errors, please separate them.

+5
source share
4 answers

Tmeans T oken .

These errors tell you that the analyzer detected a marker that it did not expect.

+9
source

tokens, , T_ ( , E_...).

+5

T token.
- PHP

+3
source

ELSE, IF, VAR, STRING, FUNCTION, etc. will be individual tokens that are important to the analyzer. I assume the T_ prefix is ​​just a style indicating that these things are tokens.

+1
source

All Articles