JBZoo\Utils\Sys::setMemory PHP Method

setMemory() public static method

Set new memory limit
public static setMemory ( string $newLimit = '256M' )
$newLimit string
    public static function setMemory($newLimit = '256M')
    {
        self::iniSet('memory_limit', $newLimit);
    }

Usage Example

Example #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'));
 }
All Usage Examples Of JBZoo\Utils\Sys::setMemory