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:
Constant | Description |
---|---|
POSIX_SC_ARG_MAX | The maximum number of bytes the arguments (and environment variables) can have. |
POSIX_SC_PAGESIZE | The number of bytes of the current page. |
POSIX_SC_NPROCESSORS_CONF | The number of cpus configured system wise. |
POSIX_SC_NPROCESSORS_ONLN | The 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
Links
POSIX
- posix_access
- posix_ctermid
- posix_eaccess
- posix_errno
- posix_fpathconf
- posix_get_last_error
- posix_getcwd
- posix_getegid
- posix_geteuid
- posix_getgid
- posix_getgrgid
- posix_getgrnam
- posix_getgroups
- posix_getlogin
- posix_getpgid
- posix_getpgrp
- posix_getpid
- posix_getppid
- posix_getpwnam
- posix_getpwuid
- posix_getrlimit
- posix_getsid
- posix_getuid
- posix_initgroups
- posix_isatty
- posix_kill
- posix_mkfifo
- posix_mknod
- posix_pathconf
- posix_setegid
- posix_seteuid
- posix_setgid
- posix_setpgid
- posix_setrlimit
- posix_setsid
- posix_setuid
- posix_strerror
- posix_times
- posix_ttyname
- posix_uname