读书人

PHP输出现阶段进程所有变量 / 常量 /

发布时间: 2012-09-10 11:02:32 作者: rapoo

PHP输出当前进程所有变量 / 常量 / 模块 / 函数 / 类

1.?get_defined_vars??(PHP 4 >= 4.0.4, PHP 5)?— 获取由所有已定义变量所组成的数组

?

array?get_defined_vars?(?void?)

?

此函数返回一个包含所有已定义变量列表的多维数组,这些变量包括环境变量、服务器变量和用户定义的变量。

?

获取所有可用的模块

?

array?get_extension_funcs?(?$module_name?)?该函数返回指定模块所有可用的函数。传入的参数(模块名称)必须是小写

?

array?get_defined_constants?([?$categorize?= false?] )

?

array?get_declared_classes?(?void?)

?

<?phpecho '<pre>';//define classoneclass classone { }//define classtwoclass classtwo { }//This will show X classes (built-ins, extensions etc) with//classone and classtwo as the last two elementsprint_r(get_declared_classes());//define classthreeclass classthree { }//...and fourclass classfour { }//Shows the same result as before with class three and four appendedprint_r(get_declared_classes());?>
?

?

?

?

读书人网 >PHP

热点推荐