示例#1
0
 /**
  * Apply a ratio multiplicator to current memory limit
  * 
  * @param float $ratio Ratio to apply
  * 
  * @return int Previous memory limit
  */
 static function memoryRatio($ratio)
 {
     $limit = CMbString::fromDecaSI(ini_get("memory_limit"), "") * $ratio;
     $limit = CMbString::toDecaSI($limit);
     return ini_set("memory_limit", $limit);
 }