Tokenizer is a wrapper around the token_get_all function. It's built up of three classes:
Token- Each token returned fromtoken_get_allis wrapped in this.TokenListIterator- ImplementsSeekableIteratorandCountablewith extra methods to allow easy moving through tokens.Tokenizer- Callstoken_get_allon the source, turns each result into aTokenrepresentation and returns aTokenListIteratorobject.
You can install Tokenizer by adding hippophp/tokenizer to your composer.json file.
HippoPHP Tokenizer is licensed under The MIT License (MIT)