src/Reporter/Terminal.php
public function readableSize($value, $precision = 0, $base = 1024)
    {
        $i = 0;
        if ($value < 1) {
            return '0';
        }

        $units = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
        while (($value / $base) >= 1) {
            $value = $value / $base;
            $i++;
        }
        $unit = isset($units[$i]) ? $units[$i] : '?';
        return round($value, $precision) . $unit;
    }
public function readableSize($value, $precision = 0, $base = 1024)
    {
        $i = 0;
        if ($value < 1) {
            return '0';
        }

        $units = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
        while (($value / $base) >= 1) {
            $value = $value / $base;
            $i++;
        }
        $unit = isset($units[$i]) ? $units[$i] : '?';
        return round($value, $precision) . $unit;
    }
public function readableSize ( $ value , $ precision = 0 , $ base = 1024 ) { $ i = 0 ; if ( $ value < 1 ) { return '0' ; } $ units = [ '' , 'K' , 'M' , 'G' , 'T' , 'P' , 'E' , 'Z' , 'Y' ] ; while ( ( $ value / $ base ) >= 1 ) { $ value = $ value / $ base ; $ i ++ ; } $ unit = isset ( $ units [ $ i ] ) ? $ units [ $ i ] : '?' ; return round ( $ value , $ precision ) . $ unit ; }
Humanizes values using an appropriate unit.

@param  integer $value     The value.
@param  integer $precision The required precision.
@param  integer $base      The unit base.
@return string             The Humanized string value.
Humanizes values using an appropriate unit .