What are some practical uses of PHP tokenizer?

后端 未结 8 1004
暖寄归人
暖寄归人 2021-02-02 11:25

What are practical and day-to-day usage examples of PHP Tokenizer ?

Has anyone used this?

8条回答
  •  抹茶落季
    2021-02-02 11:39

    A friend of mine has written Überloader (A brute-force autoloader for PHP5.) which uses this very technique when it indexes class files. The _check_file() method from it will be of particular interest to you.

    Überloader is designed for legacy projects that have not planned or thought about their class naming conventions or file structures.

    I use the class everyday in legacy projects that I am fixing up or renovating.

提交回复
热议问题