setMemory() публичный статический Метод

Set new memory limit
public static setMemory ( string $newLimit = '256M' )
$newLimit string
Пример #1
0
 public function testSetTimeAndMemory()
 {
     Sys::setTime(1800);
     Sys::setMemory('128M');
     isSame('128M', Sys::iniGet('memory_limit'));
     //isSame('1800', Sys::iniGet('set_time_limit'));
     //isSame('1800', Sys::iniGet('max_execution_time'));
 }
Пример #2
0
 /**
  * @return int
  */
 protected function _setEnv()
 {
     // set limits & reporting
     if ($this->_isDebug()) {
         error_reporting(-1);
     } else {
         error_reporting(E_ERROR | E_WARNING);
     }
     $memory = $this->_globConfig->get('memory', '1024M');
     $time = (int) $this->_globConfig->get('time', 1800);
     Sys::iniSet('display_errors', 1);
     Sys::setTime($time);
     Sys::setMemory($memory);
 }