Get the App
SLTechnology News&Howtos  ›  Development  › 

PHP outputs all variables / constants / modules / functions / classes of the current process

Shulou Source: shulou.com Published: 2022-06-03 07:40:24 11月15日 Update

This article focuses on the "PHP output of the current process of all variables / constants / modules / functions / classes of the method tutorial", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the method tutorial of PHP outputting all variables / constants / modules / functions / classes in the current process.

1. Get_defined_vars (PHP 4 > = 4.0.4, PHP 5)-gets an array of all defined variables

Array get_defined_vars (void)

This function returns a multidimensional array containing a list of all defined variables, including environment variables, server variables, and user-defined variables.

The copy code is as follows:

2. Get_defined_functions (PHP 4 > = 4.0.4, PHP 5)-gets all defined functions

Array get_defined_functions (void) / / void is empty and no parameters are required

3. Get_loaded_extensions (PHP 4, PHP 5)-get all available modules

The copy code is as follows:

4. Get_extension_funcs (PHP 4, PHP 5)-gets the available functions of the specified module

Array get_extension_funcs (string $module_name) this function returns all the functions available for the specified module. The parameter passed in (module name) must be lowercase

The copy code is as follows:

5. Get_defined_constants (PHP 4 > = 4.1.0, PHP 5)-gets the names of the associative array, all the constants and their values

Array get_defined_constants ([bool $categorize = false])

The copy code is as follows:

6. Get_declared_classes (PHP 4, PHP 5)-gets an array of defined class names

Array get_declared_classes (void)

The copy code is as follows:

At this point, I believe you have a deeper understanding of the "PHP output of all variables / constants / modules / functions / classes of the current process of the method tutorial", might as well to actual operation it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Variables codes functions modules arrays constants methods tutorials processes output content parameters names servers learning services utility deeper value interest Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Huawei Linux Apple Shulou Information