phpinfo

Outputs information about PHP's configuration

Syntax

phpinfo(int $flags = INFO_ALL): bool

Parameters

flags

The output may be customized by passing one or more of the following constants bitwise values summed together in the optional flags parameter. One can also combine the respective constants or bitwise values together with the bitwise or operator.

Name Value Description
INFO_GENERAL 1 The configuration line, php.ini location, build date, Web Server, System and more.
INFO_CREDITS 2 PHP Credits. See also phpcredits().
INFO_CONFIGURATION 4 Current Local and Master values for PHP directives. See also ini_get().
INFO_MODULES 8 Loaded modules and their respective settings. See also get_loaded_extensions().
INFO_ENVIRONMENT 16 Environment Variable information that's also available in $_ENV.
INFO_VARIABLES 32 Shows all predefined variables from EGPCS (Environment, GET, POST, Cookie, Server).
INFO_LICENSE 64 PHP License information.
INFO_ALL -1 Shows all of the above.

Return

Returns true on success or false on failure.

Examples

1 · void

<?

phpinfo();

?>

			
		

2 · flags · INFO_GENERAL

<?

$flags = INFO_GENERAL;

phpinfo($flags);

?>

			
		

3 · flags · INFO_CREDITS

<?

$flags = INFO_CREDITS;

phpinfo($flags);

?>

			
		

4 · flags · INFO_CONFIGURATION

<?

$flags = INFO_CONFIGURATION;

phpinfo($flags);

?>

			
		

5 · flags · INFO_MODULES

<?

$flags = INFO_MODULES;

phpinfo($flags);

?>

			
		

6 · flags · INFO_ENVIRONMENT

<?

$flags = INFO_ENVIRONMENT;

phpinfo($flags);

?>

			
		

7 · flags · INFO_VARIABLES

<?

$flags = INFO_VARIABLES;

phpinfo($flags);

?>

			
		

8 · flags · INFO_LICENSE

<?

$flags = INFO_LICENSE;

phpinfo($flags);

?>

			
		

9 · flags · INFO_ALL

<?

$flags = INFO_ALL;

phpinfo($flags);

?>

			
		

10 · Return

<?

$return = phpinfo();

var_export($return);

?>

			
		

assert

assert_options

cli_get_process_title

cli_set_process_title

dl

extension_loaded

gc_collect_cycles

gc_disable

gc_enable

gc_enabled

gc_mem_caches

gc_status

get_cfg_var

get_current_user

get_defined_constants

get_extension_funcs

get_include_path

get_included_files

get_loaded_extensions

get_required_files

get_resources

getenv

getlastmod

getmygid

getmyinode

getmypid

getmyuid

getopt

getrusage

ini_alter

ini_get

ini_get_all

ini_restore

ini_set

memory_get_peak_usage

memory_get_usage

memory_reset_peak_usage

php_ini_loaded_file

php_ini_scanned_files

php_sapi_name

php_uname

phpcredits

phpversion

putenv

set_include_path

set_time_limit

sys_get_temp_dir

version_compare

zend_thread_id

zend_version

PHP

Home Menu