SproutCMS

This is the code documentation for the SproutCMS project

function bytes()

Returns human readable sizes.

Usage

string Text::bytes ( integer $bytes [, string $force_unit [, string $format [, boolean $si ]]] );

Arguments

  1. integer $bytes
    size in bytes
  2. string $force_unit = NULL
    a definitive unit
  3. string $format = NULL
    the return string format
  4. boolean $si = TRUE
    whether to use SI prefixes or IEC

Return value

  • string

See also

  • Quentin Zervaas: http://www.phpriot.com/d/code/strings/filesize-format/
  • Aidan Lister: http://aidanlister.com/repos/v/function.size_readable.php
  • Based on original functions written by: