The Thruster Tokenizer Component.
Via Composer
$ composer require thruster/tokenizer
use Thruster\Component\Tokenizer\Parser;
$parser = new Parser();
$parser->parse('<?php ... ?>'); // => Token[]
$parser->parseBlock('function fooBar(){...};'); // => Token[]
$parser->parseFile('/some/file.php'); // => Token[]
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
Please see License File for more information.