1. Get_defined_vars (PHP 4 >= 4.0.4, PHP 5)-Gets an array of all defined variables arrays get_defined_vars (void) This function returns a multidimensional array that contains a list of all defined variables, which Variables include environment variables, server variables, and user-defined variables. <?php echo ' <pre> '; $b = Array (1,1,2,3,5,8); $arr = Get_defined_vars (); Print $b print_r ($arr ["B"]); Print all server variable print_r ($arr ["_server"]); Prints all available key values for the variable array print_r (Array_keys (Get_defined_vars ())); ?> 2. Get_defined_functions (PHP 4 >= 4.0.4, PHP 5)-Get all defined functions array get_defined_functions (void)//void is empty and does not require any parameters < ? php echo ' <pre> '; function foo () {echo "This is my function foo"; } $arr = Get_defined_functions (); Print_r ($arr); ?> 3. Get_loaded_extensions (PHP 4, PHP 5)-Get all available modules <?php echo ' <pre> '; Print_r (Get_loaded_extensions ()); ?> 4. Get_extension_funcs (PHP 4, PHP 5)-Gets the available functions of the specified module array get_extension_funcs (string $module _name) The function returns all available functions for the specified module. The parameters passed in (module name) must be lowercase <?php echo ' <pre> '; Print_r (Get_extension_funcs ("GD")); Print_r (Get_extension_funcs ("XML ")); ?> 5. Get_defined_constants (PHP 4 >= 4.1.0, PHP 5)-Gets the name of the associative array all constants and their value array get_defined_constants ([bool $categorize = FALSE]) <?php echo ' <pre> '; Define ("My_constant", 1); Print_r (Get_defined_constants (true)); ?> 6. Get_declared_classes (PHP 4, PHP 5)-Gets the array consisting of the names of the defined classes array get_declared_classes (void) <?php echo ' <pre> '; Define Classone class Classone {}//define Classtwo class Classtwo {}//this'll show X classes (built-ins, Exten Sions etc) with//classone and Classtwo as the last of the Elements Print_r (get_declared_classes ()); Define Classthree class Classthree {}//...and four class Classfour {}//shows the same result as before with Clas S three and four appended Print_r (Get_declared_classes ()); ?>
PHP output Current Process all variables/constants/modules/functions/Classes