public static function getBytes($key, $default = null): ?int
    {
        $value = ini_get($key);

        if ($value === false || $value === '') {
            return $default;
        }

        if ($value === '-1') {
            return -1;
        }

        $unit = preg_replace('/[^bkmgtpezy]/i', '', $value);
        $size = preg_replace('/[^0-9\.]/', '', $value);

        return ((int) $size) * ($unit ? pow(1024, mb_stripos('bkmgtpezy', $unit[0])) : 1);
    }