array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'function.ini-restore.php', 1 => 'ini_restore', 2 => 'Restores the value of a configuration option', ), 'up' => array ( 0 => 'ref.info.php', 1 => 'Функції налаштування та отримання інформації про PHP', ), 'prev' => array ( 0 => 'function.ini-parse-quantity.php', 1 => 'ini_parse_quantity', ), 'next' => array ( 0 => 'function.ini-set.php', 1 => 'ini_set', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/info/functions/ini-restore.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

ini_restore

(PHP 4, PHP 5, PHP 7, PHP 8)

ini_restoreRestores the value of a configuration option

Опис

ini_restore(string $option): void

Restores a given configuration option to its original value.

Параметри

option

The configuration option name.

Значення, що повертаються

Не повертає значень.

Приклади

Приклад #1 ini_restore() example

<?php
$setting
= 'html_errors';

echo
'Current value for \'' . $setting . '\': ' . ini_get($setting), PHP_EOL;

ini_set($setting, ini_get($setting) ? 0 : 1);
echo
'New value for \'' . $setting . '\': ' . ini_get($setting), PHP_EOL;

ini_restore($setting);
echo
'Original value for \'' . $setting . '\': ' . ini_get($setting), PHP_EOL;
?>

Поданий вище приклад виведе:

Current value for 'html_errors': 1
New value for 'html_errors': 0
Original value for 'html_errors': 1

Прогляньте також