protected static setMemoryLimit ( integer $minimumMemoryLimit ) : boolean | ||
$minimumMemoryLimit | integer | |
Résultat | boolean | true if set; false otherwise |
protected static function setMemoryLimit($minimumMemoryLimit)
{
// in Megabytes
$currentValue = self::getMemoryLimitValue();
if ($currentValue === false || $currentValue < $minimumMemoryLimit && @ini_set('memory_limit', $minimumMemoryLimit . 'M')) {
return true;
}
return false;
}