bytes
ini_size_to_bytes
ini_size_to_bytes(string $string) : integer
Some PHP ini values (like upload_max_filesize
) allow you to specify the
number of bytes in a short-hand, like "10M" or "1G". But, when you call
ini_get
you'll get these actual short-hand values, instead of the byte
equivalent (which usually you want).
This function converts a super-set of documented short-hand into bytes:
package | Haldayne |
---|---|
see | Documents the short-hand |
string
A value from an ini_get
call to process
integer
Number of bytes the short-hand string representsRestricts what can be set into a Map, optionally normalizing those values that can be set.
« More »API improvements for PHP associative arrays. Features a consistent fluent interface, keys of any type, a short-hand syntax for filtering expressions.
« More »Implements a map of floats, that is a Map whose values must all pass the `is_float` test.
« More »Implements a map of integers, that is a Map whose values must all pass the `is_int` test.
« More »Implements a map of numbers, that is a Map whose values must all pass the `is_numeric` test.
« More »Implements a map of strings, that is a Map whose values must all pass the `is_string` test.
« More »Implements an iterator over the $_FILES super-global or an array of similar structure.
« More »Runs a callable, capturing all error messages, then provides a method to extract any errors raised during execution.
« More »Runs a callable, catching any exception and reflecting it into a triggered error.
« More »