ini_restore

string ini_restore(string name) 

Restores the default value of a configuration option.

Returns:

Value of configuration option; FALSE on error

Description:

Restores a configuration to its original option if it has been changed. You can use this function to reset a value that has been changed using ini_set().

Version:

Existing since version 4.0

Example:

Alter and restore a configuration option
$option = 'magic_quotes_gpc'; 
echo 'Value of $option => ", ini_get($option); 
ini_set($option,0); 
echo 'New value of $option => ", ini_get($option); 
ini_restore($option); 
echo Restored value of $option => ", ini_get($option); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.