[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/HTML/Helpers/ -> Number.php (summary)

Joomla! Content Management System

Copyright: (C) 2010 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 108 lines (4 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 function

  bytes()

Functions
Functions that are not part of a class:

bytes($bytes, $unit = 'auto', $precision = 2, $iec = false)   X-Ref
Converts bytes to more distinguishable formats such as:
kilobytes, megabytes, etc.

By default, the proper format will automatically be chosen.
However, one of the allowed unit types (viz. 'b', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB') may also be used instead.
IEC standard unit types ('KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB') can be used as well.

param: string   $bytes      The number of bytes. Can be either numeric or suffixed format: 32M, 60K, 12G or 812b
param: string   $unit       The type of unit to return, few special values are:
param: integer  $precision  The number of digits to be used after the decimal place.
param: bool     $iec        Whether to be aware of IEC standards. IEC prefixes are always acceptable in input.
return: string   The number of bytes in the proper units.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer