INI_RESTORE(3) 1 INI_RESTORE(3)
ini_restore - Restores the value of a configuration option
SYNOPSIS
void ini_restore (string $varname)
DESCRIPTION
Restores a given configuration option to its original value.
PARAMETERS
o $varname
- The configuration option name.
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
ini_restore(3) example
<?php
$setting = 'y2k_compliance';
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 'y2k_compliance': 1
New value for 'y2k_compliance': 0
Original value for 'y2k_compliance': 1
SEE ALSO
ini_get(3), ini_get_all(3), ini_set(3).
PHP Documentation Group INI_RESTORE(3)