Home >Backend Development >PHP Tutorial >The module where the positioning function is located

The module where the positioning function is located

WBOY
WBOYOriginal
2016-07-25 09:01:311034browse
定位函数所在模块
  1. $function_name = $argv[1];
  2. $modules = get_loaded_extensions();
  3. foreach($modules as $m){
  4. $funcs = get_extension_funcs($m);
  5. if(in_array($function_name, $funcs)){
  6. printf("%s was defined in Module: %sn", $function_name, $m);
  7. exit;
  8. }
  9. }
  10. print $function_name ." Must be defined in user defined PHP script filesn";
复制代码


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn