PhpToken::isIgnorable
PHP function
Edit on GitHub ✎
(PHP 8)
Tells whether the token would be ignored by the PHP parser.
Description
PhpToken::isIgnorable(): bool
Tells whether the token would be ignored by the PHP parser.
Parameters Parameters
Return Values
A boolean value whether the token would be ignored by the PHP parser (such as whitespace or comments).
Examples
PhpToken::isIgnorable() example
php
<?php
$echo = new PhpToken(T_ECHO, 'echo');
var_dump($echo->isIgnorable()); // -> bool(false)
$space = new PhpToken(T_WHITESPACE, ' ');
var_dump($space->isIgnorable()); // -> bool(true)