404 of 410 menu

The ini_get_all Function

The ini_get_all function returns an array with all available PHP settings. You can get either all settings or only for a specific module. The function returns an associative array where the keys are the setting names, and the values are information about each setting.

Syntax

ini_get_all([string $extension]);

Example

Get all available PHP settings:

<?php $res = ini_get_all(); print_r($res); ?>

Code execution result (example):

[ 'short_open_tag' => [ 'global_value' => '1', 'local_value' => '1', 'access' => 4 ], 'display_errors' => [ 'global_value' => '1', 'local_value' => '1', 'access' => 7 ] ]

Example

Get settings only for the mbstring module:

<?php $res = ini_get_all('mbstring'); print_r($res); ?>

Code execution result (example):

[ 'mbstring.language' => [ 'global_value' => 'neutral', 'local_value' => 'neutral', 'access' => 4 ], 'mbstring.internal_encoding' => [ 'global_value' => 'UTF-8', 'local_value' => 'UTF-8', 'access' => 4 ] ]

See Also

  • the ini_get function,
    which returns the value of one setting
  • the ini_set function,
    which sets the value of a setting
byenru