Lines Matching refs:token
19 foreach ($tokens as $i => $token) {
20 printf("[%2d] %-26s %s\n", $i, $token->getTokenName(),
21 $token->isIgnorable() ? "ignorable" : "meaningful");
25 $token = $tokens[5];
28 var_dump($token->is(T_FUNCTION));
29 var_dump($token->is('function'));
30 var_dump($token->is(['class', T_FUNCTION]));
31 var_dump($token->is([T_CLASS, 'function']));
34 var_dump($token->is(T_CLASS));
35 var_dump($token->is('class'));
36 var_dump($token->is(['class', T_TRAIT]));
37 var_dump($token->is([T_CLASS, 'trait']));
41 $token->is(3.141);
46 $token->is([3.141]);
51 unset($token->id);
52 unset($token->text);
54 $token->is(T_FUNCTION);
59 $token->is('function');
64 $token->is([T_FUNCTION]);
69 $token->is(['function']);
74 echo "\nName of unknown token:\n";
75 $token = new PhpToken(100000, "foo");
76 var_dump($token->getTokenName());
120 Name of unknown token: