Core/Toolbox/Converter/Filesize.php
public function sizeToBytes()
    {
        if (!is_string($this->value)) {
            return $this->value;
        }

        $suffix = substr($this->value, -1);
        $value = substr($this->value, 0, -1);

        switch (strtoupper($suffix)) {
            case 'P':
                $value *= 1024;
            case 'T':
                $value *= 1024;
            case 'G':
                $value *= 1024;
            case 'M':
                $value *= 1024;
            case 'K':
                $value *= 1024;
                break;
        }

        return $this->result = $value;
    }
public function sizeToBytes()
    {
        if (!is_string($this->value)) {
            return $this->value;
        }

        $suffix = substr($this->value, -1);
        $value = substr($this->value, 0, -1);

        switch (strtoupper($suffix)) {
            case 'P':
                $value *= 1024;
            case 'T':
                $value *= 1024;
            case 'G':
                $value *= 1024;
            case 'M':
                $value *= 1024;
            case 'K':
                $value *= 1024;
                break;
        }

        return $this->result = $value;
    }
Transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in case of 2M)

@var $size string Size inas string (like '2M')

@return int Size in bytes