php获取已定义的函数列表、变量列表

2021-11-22
// 获取所有内置和自定的函数名称数组,$exclude_disabled为true时,禁用的函数不会返回;$functions['internal']为内置函数,$functions['user']为自定义函数
$functions = get_defined_functions($exclude_disabled  = false);

// 返回包含全部已定义变量的数组,包括环境变量、服务器变量和用户定义的变量
get_defined_vars();

 

{/if}