Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ini_parse_quantityini_set>
^PHP Options/Info FunctionsLast updated: Mon, 26 Oct 2026

ini_restore

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

ini_restore — Restores the value of a configuration option

Description

function ini_restore(string $option): void

Restores a given configuration option to its original value.

Parameters

option

The configuration option name.

Return Values

No value is returned.

Examples

Example #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;
?>

The above example will output:

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

See Also


<ini_parse_quantityini_set>
^PHP Options/Info FunctionsLast updated: Mon, 26 Oct 2026