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

posix_sysconf

Description

The posix_sysconf of POSIX for PHP returns system runtime information.

Syntax

posix_sysconf(
    int $conf_id
): int

Parameters

conf_id

Identifier of the variable with the following constants:

ConstantDescription
POSIX_SC_ARG_MAXThe maximum number of bytes the arguments (and environment variables) can have.
POSIX_SC_PAGESIZEThe number of bytes of the current page.
POSIX_SC_NPROCESSORS_CONFThe number of cpus configured system wise.
POSIX_SC_NPROCESSORS_ONLNThe number of cpus currently active system wise.

Return

Returns the numeric value related to conf_id

Examples

1 · conf_id · POSIX_SC_ARG_MAX

<?

$conf_id = POSIX_SC_ARG_MAX;

$return = posix_sysconf($conf_id);

echo $return;
2097152

2 · conf_id · POSIX_SC_PAGESIZE

<?

$conf_id = POSIX_SC_PAGESIZE;

$return = posix_sysconf($conf_id);

echo $return;
4096

3 · conf_id · POSIX_SC_NPROCESSORS_CONF

<?

$conf_id = POSIX_SC_NPROCESSORS_CONF;

$return = posix_sysconf($conf_id);

echo $return;
48

4 · conf_id · POSIX_SC_NPROCESSORS_ONLN

<?

$conf_id = POSIX_SC_NPROCESSORS_ONLN;

$return = posix_sysconf($conf_id);

echo $return;
48