PHP: Get PHP's variables, functions, constants from a php file

后端 未结 3 1834
暗喜
暗喜 2021-01-07 02:16

Is there a way to get user-defined php functions, variables, constants from a php file? Following functions are not the best way to do so because they get all decalred funct

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-07 03:09

    You probably want to try the PHP Tokenizer.

    http://www.php.net/manual/en/ref.tokenizer.php

    From an external script:

    
    

提交回复
热议问题