This is a byte conversion function
public static string Asf_Util::bytes2string(int $size [, bool $space = 1])
Byte size
Do you need spaces?
Returns the a string, such as xGB/xMB/xKB/xBytes
<?php var_dump(Asf_Util::bytes2string(2048.56)); var_dump(Asf_Util::bytes2string(1073741824, 0)); var_dump(Asf_Util::bytes2string(3645.44, 0)); var_dump(Asf_Util::bytes2string(0));
The above example will output:
string(10) "2.00055 KB" string(3) "1GB" string(6) "3.56KB" string(7) "0 Bytes"