Bytes
class Bytes (View source)
Provides helper methods for byte conversions.
Constants
| KILOBYTE |
The number of bytes in a kilobyte. |
| ALLOWED_SUFFIXES |
The allowed suffixes of a bytes string in lowercase. |
Methods
static int
static float
toNumber(int|float|string $size)
Parses a given byte size.
static bool
validate(string $string)
Validate that a string is a representation of a number of bytes.
Details
static int
toInt(mixed $size)
deprecated
deprecated
Parses a given byte size.
static float
toNumber(int|float|string $size)
Parses a given byte size.
static bool
validate(string $string)
Validate that a string is a representation of a number of bytes.