Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sets the value of a configuration option
<?php ini_set(string $option, string|int|float|bool|null $value): string|false
<?php register_shutdown_function($this->forwardsTo('handleShutdown'));
if (! $app->environment('testing')) {
ini_set('display_errors', 'Off');
}
}
<?php if (ini_get('open_basedir') === '') {
$openBaseDir = windows_os() ? explode('\\', __DIR__)[0].'\\'.';'.sys_get_temp_dir() : '/';
$iniSet = ini_set(
'open_basedir',
$openBaseDir
);
$this->assertNotFalse($iniSet, 'Could not set config for open_basedir.');
}
<?php public static function dump($var, int $maxDepth = 2): string
{
$html = ini_set('html_errors', '1');
assert(is_string($html));
if (extension_loaded('xdebug')) {
<?php assert(is_string($html));
if (extension_loaded('xdebug')) {
ini_set('xdebug.var_display_max_depth', (string) $maxDepth);
}
$var = self::export($var, $maxDepth);
<?php return strip_tags(html_entity_decode($output));
} finally {
ini_set('html_errors', $html);
}
}
<?php use Laravel\Octane\Exceptions\DdException;
ini_set('display_errors', 'stderr');
$_ENV['APP_RUNNING_IN_CONSOLE'] = false;
<?php public function toEleven()
{
@ini_set('memory_limit', config('statamic.system.php_memory_limit'));
@set_time_limit(config('statamic.system.php_max_execution_time'));
}
<?php public function toEleven()
{
@ini_set('memory_limit', config('statamic.system.php_memory_limit'));
@set_time_limit(config('statamic.system.php_max_execution_time'));
}
<?php });
}
ini_set('pcre.backtrack_limit', config('statamic.system.pcre_backtrack_limit', -1));
}
}
<?php static $shutdownRegistered = false;
if (function_exists('ini_set') && extension_loaded('xdebug')) {
ini_set('xdebug.show_exception_trace', '0');
ini_set('xdebug.scream', '0');
}
<?php if (function_exists('ini_set') && extension_loaded('xdebug')) {
ini_set('xdebug.show_exception_trace', '0');
ini_set('xdebug.scream', '0');
}
if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
<?php 'Foo\\VeryLongNowdoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongNowdoc.php',
);
ini_set('pcre.backtrack_limit', '30000');
$result = ClassMapGenerator::createMap(__DIR__ . '/Fixtures/pcrebacktracelimit');
ini_restore('pcre.backtrack_limit');
<?php public function connectionToRemoteTCP4n6ServerShouldResultInOurIP()
{
ini_set('xdebug.max_nesting_level', 256);
$connector = new Connector(array('happy_eyeballs' => true));
<?php public function testIncompleteClass()
{
$unserializeCallbackHandler = ini_set('unserialize_callback_func', null);
$var = unserialize('O:8:"Foo\Buzz":0:{}');
ini_set('unserialize_callback_func', $unserializeCallbackHandler);
<?php {
$unserializeCallbackHandler = ini_set('unserialize_callback_func', null);
$var = unserialize('O:8:"Foo\Buzz":0:{}');
ini_set('unserialize_callback_func', $unserializeCallbackHandler);
$this->assertDumpMatchesFormat(
<<<EOTXT