protected function getConfigBytes($val)
    {
        $val = trim($val);
        $bytes = (int)(substr($val, 0, -1));
        $last = strtolower($val[strlen($val) - 1]);

        switch ($last) {
            case 'g':
                $bytes *= 1024;
            case 'm':
                $bytes *= 1024;
            case 'k':
                $bytes *= 1024;
        }

        return $this->fixIntegerOverflow($bytes);
    }