ini_get_all

FunctionParams and return types changed in PHP 8.0

Gets all configuration options.

PHP 5
PHP 7.0
Improved
PHP 7.1-7.4
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
PHP 8.5
PHP 8.6

ini_get_all Function synopsis

ini_get_all(?string $extension = null, bool $details = true): array|false

Parameters

$extension

OptionalType?stringDefault valuenull

An optional extension name. If not null or the string core, the function returns only options specific for that extension.

$details

OptionalTypeboolDefault valuetrue

Retrieve details settings or only the current value for each setting. Default is true (retrieve details).

Return value

Typearray|false

Returns an associative array with directive name as the array key. Returns false and raises an E_WARNING level error if the $extension doesn't exist.

When $details is true (default) the array will contain global_value (set in php.ini), local_value (perhaps set with ini_set or .htaccess), and access (the access level).

When $details is false the value will be the current value of the option.

See the manual section for information on what access levels mean.

It's possible for a directive to have multiple access levels, which is
why `access` shows the appropriate bitmask values.

Changes to the ini_get_all Function

PHP 8.0

  • Return type added: array|false
  • Parameter type added for parameter #1 ($extension): ?string
  • Parameter default value added for position #1 ($extension): null
  • Parameter type added for parameter #2 ($details): bool
  • Parameter default value added for position #2 ($details): true
- ini_get_all($extension, $details)
+ ini_get_all(?string $extension = null, bool $details = true): array|false

PHP 7.0

  • Optional parameter added - #2: $details
- ini_get_all($extension)
+ ini_get_all($extension, $details)

ini_get_all Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes