public static function bytesTo($size, $precision = 0) {
        $sizes = array('YB', 'ZB', 'EB', 'PB', 'TB', 'GB', 'MB', 'KB', 'B');
        $total = count($sizes);

        while ($total-- && $size >= 1024) {
            $size /= 1024;
        }

        return static::precision($size, $precision) . $sizes[$total];
    }
public static function bytesTo($size, $precision = 0) {
        $sizes = array('YB', 'ZB', 'EB', 'PB', 'TB', 'GB', 'MB', 'KB', 'B');
        $total = count($sizes);

        while ($total-- && $size >= 1024) {
            $size /= 1024;
        }

        return static::precision($size, $precision) . $sizes[$total];
    }
public static function bytesTo ( $ size , $ precision = 0 ) { $ sizes = array ( 'YB' , 'ZB' , 'EB' , 'PB' , 'TB' , 'GB' , 'MB' , 'KB' , 'B' ) ; $ total = count ( $ sizes ) ; while ( $ total -- && $ size >= 1024 ) { $ size /= 1024 ; } return static :: precision ( $ size , $ precision ) . $ sizes [ $ total ] ; }
Convert a numerical value to the readable string notated equivalent.

@param int $size
@param int $precision
@return string
Convert a numerical value to the readable string notated equivalent .