protected function translateMemoryLimit($memoryLimit)
    {
        $unit = strtolower(substr($memoryLimit, -1, 1));
        $memoryLimit = (int) $memoryLimit;
        switch ($unit) {
            case 'g':
                $memoryLimit *= 1024;
            // intentional
            case 'm':
                $memoryLimit *= 1024;
            // intentional
            case 'k':
                $memoryLimit *= 1024;
            // intentional
        }

        return $memoryLimit;
    }
protected function translateMemoryLimit($memoryLimit)
    {
        $unit = strtolower(substr($memoryLimit, -1, 1));
        $memoryLimit = (int) $memoryLimit;
        switch ($unit) {
            case 'g':
                $memoryLimit *= 1024;
            // intentional
            case 'm':
                $memoryLimit *= 1024;
            // intentional
            case 'k':
                $memoryLimit *= 1024;
            // intentional
        }

        return $memoryLimit;
    }
protected function translateMemoryLimit ( $ memoryLimit ) { $ unit = strtolower ( substr ( $ memoryLimit , - 1 , 1 ) ) ; $ memoryLimit = ( int ) $ memoryLimit ; switch ( $ unit ) { case 'g' : $ memoryLimit *= 1024 ; // intentional case 'm' : $ memoryLimit *= 1024 ; // intentional case 'k' : $ memoryLimit *= 1024 ; // intentional } return $ memoryLimit ; }
Translate the memory limit string to a int in bytes.
@param $memoryLimit
@return int
Translate the memory limit string to a int in bytes .