posix_setrlimit
Function • Params and return types changed in PHP 8.0
Set system resource limits.
posix_setrlimit Function synopsis
posix_setrlimit(
int $resource,
int $soft_limit,
int $hard_limit
): bool
Parameters
$resource
Typeint
The resource limit constant corresponding to the limit that is being set.
$soft_limit
Typeint
The soft limit, in whatever unit the resource limit requires, or
POSIX_RLIMIT_INFINITY.
$hard_limit
Typeint
The hard limit, in whatever unit the resource limit requires, or
POSIX_RLIMIT_INFINITY.
Return value
Typebool
Returns true on success, false on failure
Changes to the posix_setrlimit Function
PHP 8.0
- Return type added:
bool - Parameter type added for parameter #1 (
$resource):int - Parameter name of parameter #2 changed:
$softlimitto$soft_limit - Parameter type added for parameter #2 (
$soft_limit):int - Parameter name of parameter #3 changed:
$hardlimitto$hard_limit - Parameter type added for parameter #3 (
$hard_limit):int
posix_setrlimit(
- $resource,
+ int $resource,
- $softlimit,
+ int $soft_limit,
- $hardlimit
+ int $hard_limit
- )
+ ): bool PHP 7.0
- Function added
posix_setrlimit Function Availability
posix_setrlimit 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 | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | No |
| PHP 5.5Unsupported | No |
| PHP 5.4Unsupported | No |
| PHP 5.3Unsupported | No |