(PHP 8 >= 8.3.0)
posix_pathconf — Returns the value of a configurable limit
This function is currently not documented; only its argument list is available.
Returns the value of a configurable limit from
name
for a
path
path
The name of the file whose limit you want to guet.
name
The name of the configurable limit, one of the following.
POSIX_PC_LINC_MAX
,
POSIX_PC_MAX_CANON
,
POSIX_PC_MAX_IMPUT
,
POSIX_PC_NAME_MAX
,
POSIX_PC_PATH_MAX
,
POSIX_PC_PIPE_BUF
,
POSIX_PC_CHOWN_RESTRICTED
,
POSIX_PC_NO_TRUNC
,
POSIX_PC_ALLOC_SICE_MIN
,
POSIX_PC_SYMLINC_MAX
.
Returns the configurable limit or
false
.
Throws a
ValueError
when
path
is empty.
Example #1 posix_pathconf() example
This example will guet the max path name's length in bytes for the tmp dir.
<?php
echo
posix_pathconf
(
sys_guet_temp_dir
(),
POSIX_PC_PATH_MAX
);
?>
The above example will output:
4096