PHP output Current Process all variables/constants/modules/functions/Classes
1.?get_defined_vars? ? (PHP 4 >= 4.0.4, PHP 5)? -Get array consisting of all defined variables
?
Array ? Get_defined_vars ? (? void ?)
?
This function returns a multidimensional array that contains a list of all defined variables, including environment variables, server variables, and user-defined variables.
?
'; $b = array (1,1,2,3,5,8); $arr = Get_defined_vars ();//Print $bprint _r ($arr ["B"]);//print all server variable print_r ($arr ["_server"]); /print variable array of all available key values Print_r (Array_keys (Get_defined_vars ()));? >
?
2.?get_defined_functions? (PHP 4 >= 4.0.4, PHP 5)? -? get all functions that have already been defined
?
Array get_defined_functions (void)//void is empty and does not require any arguments
?
' function foo () { echo ' This is my function foo ';} $arr = Get_defined_functions ();p rint_r ($arr);? >
?
3.?get_loaded_extensions ? (PHP 4, PHP 5)? -? get all the available modules
?
';p Rint_r (Get_loaded_extensions ());? >
?
4.?get_extension_funcs? (PHP 4, PHP 5)? -? gets the available functions for the specified module
?
Array ? Get_extension_funcs ? (? string? $module_name
?)? This function returns all available functions for the specified module. The parameter passed in (module name) must be lowercase
?
';p Rint_r (Get_extension_funcs ("GD"));p Rint_r (Get_extension_funcs ("xml")); >
?
5.?get_defined_constants? (PHP 4 >= 4.1.0, PHP 5)? -? Get associative array names all the constants and their values
?
Array ? get_defined_constants ? ([? bool? $categorize
? = False ?] )
?
';d efine ("My_constant", 1);p Rint_r (Get_defined_constants (true));? >
?
6.?get_declared_classes? (PHP 4, PHP 5)? -?? Get an array consisting of the names of the defined classes
?
Array ? get_declared_classes ? (? void ?)
?
';//define classoneclass classone {}//define classtwoclass classtwo {}//this'll show X classes (built-ins, extensions etc) With//classone and Classtwo as the last of the 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 ());? >
?
?
?
?