Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

posix_setrlimit

Description

The posix_setrlimit of POSIX for PHP sets the system resource limits.

Syntax

posix_setrlimit(
    int $resource,
    int $soft_limit,
    int $hard_limit
): bool

Parameters

resource

The resource limit constant corresponding to the limit that is being set.

soft_limit

The soft limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.

hard_limit

The hard limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.

Return

Returns true on success or false on failure.

Examples

1 · resource soft_limit hard_limit

<?

$resource = POSIX_RLIMIT_CORE;
$soft_limit = 0;
$hard_limit = POSIX_RLIMIT_INFINITY;

$return = posix_setrlimit($resource, $soft_limit, $hard_limit);

var_export($return);

?>
true
HomeMenu