WordPress at a glance
function is not described

wp_convert_bytes_to_hr() WP 2.3.0

Deprecated in 3.6.0. It is no longer supported and can be removed in future releases. Use size_format() instead.

Converts an integer byte value to a shorthand byte value.

  • See: size_format()

No Hooks.

Return

String. A shorthand byte value.

Usage

wp_convert_bytes_to_hr( $bytes );
$bytes(int) (required)
An integer byte value.

Code of wp convert bytes to hr: wp-includes/deprecated.php WP 5.2.2

<?php
function wp_convert_bytes_to_hr( $bytes ) {
	_deprecated_function( __FUNCTION__, '3.6.0', 'size_format()' );

	$units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
	$log   = log( $bytes, KB_IN_BYTES );
	$power = (int) $log;
	$size  = pow( KB_IN_BYTES, $log - $power );

	if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) {
		$unit = $units[ $power ];
	} else {
		$size = $bytes;
		$unit = $units[0];
	}

	return $size . $unit;
}