I expected to find a simple T_EQUALor T_ASSIGNas a token for = here in the list of tokens of the PHP parser , but it does not exist.
T_EQUAL
T_ASSIGN
=
What token is used to express an assignment operation? Let's say I have it $x = 1;, starts with T_VARIABLE, then T_WHITESPACE, then =, followed by any token, the number falls under, and then ends with ;. What token is used to represent these characters?
$x = 1;
T_VARIABLE
T_WHITESPACE
;
If you run this code:
var_dump(token_get_all('<?php $foo = "bar"; ?>'));
You will see that =and ;are not tokens.
PHP , token_get_all "... (.. ;, ., , ! ..) , 0, 1 2." , , - .
token_get_all
, , Parser, T_NS_SEPARATOR (.. ) . , PHP C, C, , (.. "\\"), . .
T_NS_SEPARATOR
"\\"