ini_parse_quantity
Function • Added in PHP 8.2
Get interpreted size from ini shorthand syntax.
ini_parse_quantity Function synopsis
ini_parse_quantity(string $shorthand): int
Parameters
$shorthand
Typestring
Ini shorthand to parse, must be a number followed by an optional multiplier.
The following multipliers are supported: `k`/`K` (`1024`),
`m`/`M` (`1048576`),
`g`/`G` (`1073741824`).
The number can be a decimal, hex (prefixed with `0x` or `0X`),
octal (prefixed with `0o`, `0O` or `0`) or binary (prefixed with
`0b` or `0B`)
Return value
Typeint
Returns the interpreted size in bytes as an int.
Changes to the ini_parse_quantity Function
PHP 8.2
- Function added
ini_parse_quantity Function Availability
ini_parse_quantity Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | No |
| PHP 8.0Unsupported | No |
| PHP 7.4Unsupported | No |
| PHP 7.3Unsupported | No |
| PHP 7.2Unsupported | No |
| PHP 7.1Unsupported | No |
| PHP 7.0Unsupported | No |
| PHP 5.6Unsupported | No |
| PHP 5.5Unsupported | No |
| PHP 5.4Unsupported | No |
| PHP 5.3Unsupported | No |