ImageTools

User Documentation: Functions: convertbytes

int convertbytes( string bytes [, string unit] )

Description

Converts bytes.

Parameters

bytes Number value of bytes or number value with extension: " bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"
unit Convert byte unit: "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"
[ If false, "bytes" is used. ]

Usage

$vif->convertbytes($bytes, $unit);