class Token
Represents a Token.
EOF_TYPE | |
NAME_TYPE | |
NUMBER_TYPE | |
STRING_TYPE | |
OPERATOR_TYPE | |
PUNCTUATION_TYPE |
$value | |||
$type | |||
$cursor |
__construct(string $type, string|int|float|null $value, int|null $cursor) | ||
string | __toString() Returns a string representation of the token. | |
bool | test(array|int $type, string|null $value = null) Tests the current token for a type and/or a value. |
string | $type | The type of the token (self::*_TYPE) |
string|int|float|null | $value | The token value |
int|null | $cursor | The cursor position in the source |
Returns a string representation of the token.
string | A string representation of the token |
Tests the current token for a type and/or a value.
array|int | $type | The type to test |
string|null | $value | The token value |
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/ExpressionLanguage/Token.html