protected function returnBytes($val)
    {
        $val = trim($val);
        $last = strtolower($val[strlen($val)-1]);
        // Do not add breaks in the switch below
        switch ($last) {
            // The 'G' modifier is available since PHP 5.1.0
            case 'g':
                $val = (int)$val*1024;
                // no break
            case 'm':
                $val = (int)$val*1024;
                // no break
            case 'k':
                $val = (int)$val*1024;
        }

        return $val;
    }
protected function returnBytes($val)
    {
        $val = trim($val);
        $last = strtolower($val[strlen($val)-1]);
        // Do not add breaks in the switch below
        switch ($last) {
            // The 'G' modifier is available since PHP 5.1.0
            case 'g':
                $val = (int)$val*1024;
                // no break
            case 'm':
                $val = (int)$val*1024;
                // no break
            case 'k':
                $val = (int)$val*1024;
        }

        return $val;
    }
protected function returnBytes ( $ val ) { $ val = trim ( $ val ) ; $ last = strtolower ( $ val [ strlen ( $ val ) - 1 ] ) ; // Do not add breaks in the switch below switch ( $ last ) { // The 'G' modifier is available since PHP 5.1.0 case 'g' : $ val = ( int ) $ val * 1024 ; // no break case 'm' : $ val = ( int ) $ val * 1024 ; // no break case 'k' : $ val = ( int ) $ val * 1024 ; } return $ val ; }
Return bytes from memory .ini value

@param string $val .ini value

@return int
Return bytes from memory . ini value