What are practical and day-to-day usage examples of PHP Tokenizer ?
Has anyone used this?
Interesting question.
I have not used the tokenizer in any production projects myself yet, but there are several questions on Stack Overflow to which the tokenizer is the (or at least, one) correct answer.
Automatically parsing PHP to separate PHP code from HTML - extracting comments out of PHP code, e.g. to build documentation (phpDocumentor works this way)
Class exists in an external file - analyzing code, seeing whether a class exists inside a file (e.g. for a plugin management system)
Permanently write variables to a php file with php - altering PHP source code files, e.g. to fill in configuration variables. Using the tokenizer woud be the first step to do this on a parser level.
How to create a list of all built-in PHP functions a project makes use of? - analyzing what functions are used in a PHP project