* item may be an integer value of the element or the * constant name of the element. The following is a list of constant names * for item that may be used and their description. * Some of these constants may not be defined or hold no value for certain * locales.

* nl_langinfo Constants * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ConstantDescription
LC_TIME Category Constants
ABDAY_(1-7)Abbreviated name of n-th day of the week.
DAY_(1-7)Name of the n-th day of the week (DAY_1 = Sunday).
ABMON_(1-12)Abbreviated name of the n-th month of the year.
MON_(1-12)Name of the n-th month of the year.
AM_STRString for Ante meridian.
PM_STRString for Post meridian.
D_T_FMTString that can be used as the format string for strftime to represent time and date.
D_FMTString that can be used as the format string for strftime to represent date.
T_FMTString that can be used as the format string for strftime to represent time.
T_FMT_AMPMString that can be used as the format string for strftime to represent time in 12-hour format with ante/post meridian.
ERAAlternate era.
ERA_YEARYear in alternate era format.
ERA_D_T_FMTDate and time in alternate era format (string can be used in strftime).
ERA_D_FMTDate in alternate era format (string can be used in strftime).
ERA_T_FMTTime in alternate era format (string can be used in strftime).
LC_MONETARY Category Constants
INT_CURR_SYMBOLInternational currency symbol.
CURRENCY_SYMBOLLocal currency symbol.
CRNCYSTRSame value as CURRENCY_SYMBOL.
MON_DECIMAL_POINTDecimal point character.
MON_THOUSANDS_SEPThousands separator (groups of three digits).
MON_GROUPINGLike "grouping" element.
POSITIVE_SIGNSign for positive values.
NEGATIVE_SIGNSign for negative values.
INT_FRAC_DIGITSInternational fractional digits.
FRAC_DIGITSLocal fractional digits.
P_CS_PRECEDESReturns 1 if CURRENCY_SYMBOL precedes a positive value.
P_SEP_BY_SPACEReturns 1 if a space separates CURRENCY_SYMBOL from a positive value.
N_CS_PRECEDESReturns 1 if CURRENCY_SYMBOL precedes a negative value.
N_SEP_BY_SPACEReturns 1 if a space separates CURRENCY_SYMBOL from a negative value.
P_SIGN_POSNReturns 0 if parentheses surround the quantity and CURRENCY_SYMBOL.
* @return string|false the element as a string, or false if item * is not valid. */ #[Pure(true)] function nl_langinfo(int $item): string|false {} /** * Calculate the soundex key of a string * @link https://php.net/manual/en/function.soundex.php * @param string $string

* The input string. *

* @return string the soundex key as a string. */ #[Pure] function soundex(string $string): string {} /** * Calculate Levenshtein distance between two strings * @link https://php.net/manual/en/function.levenshtein.php * Note: In its simplest form the function will take only the two strings * as parameter and will calculate just the number of insert, replace and * delete operations needed to transform str1 into str2. * Note: A second variant will take three additional parameters that define * the cost of insert, replace and delete operations. This is more general * and adaptive than variant one, but not as efficient. * @param string $string1

* One of the strings being evaluated for Levenshtein distance. *

* @param string $string2

* One of the strings being evaluated for Levenshtein distance. *

* @param int $insertion_cost [optional]

* Defines the cost of insertion. *

* @param int $replacement_cost [optional]

* Defines the cost of replacement. *

* @param int $deletion_cost [optional]

* Defines the cost of deletion. *

* @return int This function returns the Levenshtein-Distance between the * two argument strings or -1, if one of the argument strings * is longer than the limit of 255 characters. */ function levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1): int {} /** * Generate a single-byte string from a number * @link https://php.net/manual/en/function.chr.php * @param int $codepoint

* The ascii code. *

* @return string the specified character. */ #[Pure] function chr(int $codepoint): string {} /** * Convert the first byte of a string to a value between 0 and 255 * @link https://php.net/manual/en/function.ord.php * @param string $character

* A character. *

* @return int<0, 255> the ASCII value as an integer. */ #[Pure] function ord(string $character): int {} /** * Parses the string into variables * @link https://php.net/manual/en/function.parse-str.php * @param string $string

* The input string. *

* @param array &$result

* If the second parameter arr is present, * variables are stored in this variable as array elements instead.
* Since 7.2.0 this parameter is not optional. *

* @return void */ function parse_str( string $string, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] &$result = [], #[PhpStormStubsElementAvailable(from: '8.0')] &$result ): void {} /** * Parse a CSV string into an array * @link https://php.net/manual/en/function.str-getcsv.php * @param string $string

* The string to parse. *

* @param string $separator [optional]

* Set the field delimiter (one character only). *

* @param string $enclosure [optional]

* Set the field enclosure character (one character only). *

* @param string $escape [optional]

* Set the escape character (one character only). * Defaults as a backslash (\) *

* @return array an indexed array containing the fields read. */ #[Pure] function str_getcsv(string $string, string $separator = ",", string $enclosure = '"', string $escape = "\\"): array {} /** * Pad a string to a certain length with another string * @link https://php.net/manual/en/function.str-pad.php * @param string $string

* The input string. *

* @param int $length

* If the value of pad_length is negative, * less than, or equal to the length of the input string, no padding * takes place. *

* @param string $pad_string [optional]

* The pad_string may be truncated if the * required number of padding characters can't be evenly divided by the * pad_string's length. *

* @param int $pad_type [optional]

* Optional argument pad_type can be * STR_PAD_RIGHT, STR_PAD_LEFT, * or STR_PAD_BOTH. If * pad_type is not specified it is assumed to be * STR_PAD_RIGHT. *

* @return string the padded string. */ #[Pure] function str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string {} /** * Alias: * {@see rtrim} * @param string $string The input string. * @param string $characters [optional] * @return string the modified string. * @link https://php.net/manual/en/function.chop.php * @see rtrim() */ #[Pure] function chop(string $string, string $characters): string {} /** * Alias: * {@see strstr} * @link https://php.net/manual/en/function.strchr.php * Note: This function is case-sensitive. For case-insensitive searches, use stristr(). * Note: If you only want to determine if a particular needle occurs within haystack, * use the faster and less memory intensive function strpos() instead. * * @param string $haystack The input string. * @param string $needle If needle is not a string, it is converted to an integer and applied as the ordinal value of a character. * @param bool $before_needle [optional] If TRUE, strstr() returns the part of the haystack before the first occurrence of the needle (excluding the needle). * @return string|false Returns the portion of string, or FALSE if needle is not found. */ #[Pure] function strchr(string $haystack, string $needle, bool $before_needle = false): string|false {} /** * Return a formatted string * @link https://php.net/manual/en/function.sprintf.php * @param string $format

* The format string is composed of zero or more directives: * ordinary characters (excluding %) that are * copied directly to the result, and conversion * specifications, each of which results in fetching its * own parameter. This applies to both sprintf * and printf. *

*

* Each conversion specification consists of a percent sign * (%), followed by one or more of these * elements, in order: * An optional sign specifier that forces a sign * (- or +) to be used on a number. By default, only the - sign is used * on a number if it's negative. This specifier forces positive numbers * to have the + sign attached as well, and was added in PHP 4.3.0.

* @param string|int|float ...$values

*

* @return string a string produced according to the formatting string * format. */ #[Pure] function sprintf( string $format, #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $values, mixed ...$values ): string {} /** * Output a formatted string * @link https://php.net/manual/en/function.printf.php * @param string $format

* See sprintf for a description of * format. *

* @param string|int|float ...$values [optional]

*

* @return int the length of the outputted string. */ function printf(string $format, mixed ...$values): int {} /** * Output a formatted string * @link https://php.net/manual/en/function.vprintf.php * @param string $format

* See sprintf for a description of * format. *

* @param array $values

*

* @return int the length of the outputted string. */ function vprintf(string $format, array $values): int {} /** * Return a formatted string * @link https://php.net/manual/en/function.vsprintf.php * @param string $format

* See sprintf for a description of * format. *

* @param array $values

*

* @return string Return array values as a formatted string according to * format (which is described in the documentation * for sprintf). */ #[Pure] function vsprintf(string $format, array $values): string {} /** * Write a formatted string to a stream * @link https://php.net/manual/en/function.fprintf.php * @param resource $stream &fs.file.pointer; * @param string $format

* See sprintf for a description of * format. *

* @param mixed ...$values [optional]

*

* @return int the length of the string written. */ function fprintf($stream, string $format, mixed ...$values): int {} /** * Write a formatted string to a stream * @link https://php.net/manual/en/function.vfprintf.php * @param resource $stream

*

* @param string $format

* See sprintf for a description of * format. *

* @param array $values

*

* @return int the length of the outputted string. */ function vfprintf($stream, string $format, array $values): int {} /** * Parses input from a string according to a format * @link https://php.net/manual/en/function.sscanf.php * @param string $string

* The input string being parsed. *

* @param string $format

* The interpreted format for str, which is * described in the documentation for sprintf with * following differences: * Function is not locale-aware. * F, g, G and * b are not supported. * D stands for decimal number. * i stands for integer with base detection. * n stands for number of characters processed so far. *

* @param mixed &...$vars [optional] * @return array|int|null If only * two parameters were passed to this function, the values parsed * will be returned as an array. Otherwise, if optional parameters are passed, * the function will return the number of assigned values. The optional * parameters must be passed by reference. */ function sscanf(string $string, string $format, #[TypeContract(exists: "int|null", notExists: "array|null")] mixed &...$vars): array|int|null {} /** * Parses input from a file according to a format * @link https://php.net/manual/en/function.fscanf.php * @param resource $stream &fs.file.pointer; * @param string $format

* The specified format as described in the * sprintf documentation. *

* @param mixed &...$vars [optional] * @return array|int|false|null If only two parameters were passed to this function, the values parsed will be * returned as an array. Otherwise, if optional parameters are passed, the * function will return the number of assigned values. The optional * parameters must be passed by reference. */ function fscanf($stream, string $format, #[TypeContract(exists: "int|false|null", notExists: "array|false|null")] mixed &...$vars): array|int|false|null {} /** * Parse a URL and return its components * @link https://php.net/manual/en/function.parse-url.php * @param string $url

* The URL to parse. Invalid characters are replaced by * _. *

* @param int $component [optional]

* Specify one of PHP_URL_SCHEME, * PHP_URL_HOST, PHP_URL_PORT, * PHP_URL_USER, PHP_URL_PASS, * PHP_URL_PATH, PHP_URL_QUERY * or PHP_URL_FRAGMENT to retrieve just a specific * URL component as a string. *

* @return array|string|int|null|false On seriously malformed URLs, parse_url() may return FALSE. * If the component parameter is omitted, an associative array is returned. * At least one element will be present within the array. Potential keys within this array are: * scheme - e.g. http * host * port * user * pass * path * query - after the question mark ? * fragment - after the hashmark # *

*

* If the component parameter is specified a * string is returned instead of an array. */ #[ArrayShape(["scheme" => "string", "host" => "string", "port" => "int", "user" => "string", "pass" => "string", "query" => "string", "path" => "string", "fragment" => "string"])] #[Pure] function parse_url(string $url, int $component = -1): array|string|int|false|null {} /** * URL-encodes string * @link https://php.net/manual/en/function.urlencode.php * @param string $string

* The string to be encoded. *

* @return string a string in which all non-alphanumeric characters except * -_. have been replaced with a percent * (%) sign followed by two hex digits and spaces encoded * as plus (+) signs. It is encoded the same way that the * posted data from a WWW form is encoded, that is the same way as in * application/x-www-form-urlencoded media type. This * differs from the RFC 3986 encoding (see * rawurlencode) in that for historical reasons, spaces * are encoded as plus (+) signs. */ #[Pure] function urlencode(string $string): string {} /** * Decodes URL-encoded string * @link https://php.net/manual/en/function.urldecode.php * @param string $string

* The string to be decoded. *

* @return string the decoded string. */ #[Pure] function urldecode(string $string): string {} /** * URL-encode according to RFC 3986 * @link https://php.net/manual/en/function.rawurlencode.php * @param string $string

* The URL to be encoded. *

* @return string a string in which all non-alphanumeric characters except * -_. have been replaced with a percent * (%) sign followed by two hex digits. This is the * encoding described in RFC 1738 for * protecting literal characters from being interpreted as special URL * delimiters, and for protecting URLs from being mangled by transmission * media with character conversions (like some email systems). */ #[Pure] function rawurlencode(string $string): string {} /** * Decode URL-encoded strings * @link https://php.net/manual/en/function.rawurldecode.php * @param string $string

* The URL to be decoded. *

* @return string the decoded URL, as a string. */ #[Pure] function rawurldecode(string $string): string {} /** * Generate URL-encoded query string * @link https://php.net/manual/en/function.http-build-query.php * @param object|array $data

* May be an array or object containing properties. *

*

* If query_data is an array, it may be a simple one-dimensional structure, * or an array of arrays (which in turn may contain other arrays). *

*

* If query_data is an object, then only public properties will be incorporated into the result. *

* @param string $numeric_prefix [optional]

* If numeric indices are used in the base array and this parameter is * provided, it will be prepended to the numeric index for elements in * the base array only. *

*

* This is meant to allow for legal variable names when the data is * decoded by PHP or another CGI application later on. *

* @param string|null $arg_separator

* arg_separator.output * is used to separate arguments, unless this parameter is specified, * and is then used. *

* @param int $encoding_type By default, PHP_QUERY_RFC1738. *

If enc_type is PHP_QUERY_RFC1738, then encoding is performed per » RFC 1738 and the application/x-www-form-urlencoded media type, * which implies that spaces are encoded as plus (+) signs. *

If enc_type is PHP_QUERY_RFC3986, then encoding is performed according to » RFC 3986, and spaces will be percent encoded (%20). * @return string a URL-encoded string. */ #[Pure] function http_build_query(object|array $data, string $numeric_prefix = "", ?string $arg_separator = null, int $encoding_type = PHP_QUERY_RFC1738): string {} /** * Returns the target of a symbolic link * @link https://php.net/manual/en/function.readlink.php * @param string $path

* The symbolic link path. *

* @return string|false the contents of the symbolic link path or false on error. */ #[Pure(true)] function readlink(string $path): string|false {} /** * Gets information about a link * @link https://php.net/manual/en/function.linkinfo.php * @param string $path

* Path to the link. *

* @return int|false linkinfo returns the st_dev field * of the Unix C stat structure returned by the lstat * system call. Returns 0 or false in case of error. */ #[Pure(true)] function linkinfo(string $path): int|false {} /** * Creates a symbolic link * @link https://php.net/manual/en/function.symlink.php * @param string $target

* Target of the link. *

* @param string $link

* The link name. *

* @return bool true on success or false on failure. */ function symlink(string $target, string $link): bool {} /** * Create a hard link * @link https://php.net/manual/en/function.link.php * @param string $target Target of the link. * @param string $link The link name. * @return bool true on success or false on failure. */ function link(string $target, string $link): bool {} /** * Deletes a file * @link https://php.net/manual/en/function.unlink.php * @param string $filename

* Path to the file. *

* @param resource $context [optional] * @return bool true on success or false on failure. */ function unlink(string $filename, $context): bool {} /** * Execute an external program * @link https://php.net/manual/en/function.exec.php * @param string $command

* The command that will be executed. *

* @param array &$output [optional]

* If the output argument is present, then the * specified array will be filled with every line of output from the * command. Trailing whitespace, such as \n, is not * included in this array. Note that if the array already contains some * elements, exec will append to the end of the array. * If you do not want the function to append elements, call * unset on the array before passing it to * exec. *

* @param int &$result_code [optional]

* If the return_var argument is present * along with the output argument, then the * return status of the executed command will be written to this * variable. *

* @return string|false The last line from the result of the command. If you need to execute a * command and have all the data from the command passed directly back without * any interference, use the passthru function. *

*

* To get the output of the executed command, be sure to set and use the * output parameter. */ function exec(string $command, &$output, &$result_code): string|false {} /** * Execute an external program and display the output * @link https://php.net/manual/en/function.system.php * @param string $command

* The command that will be executed. *

* @param int &$result_code [optional]

* If the return_var argument is present, then the * return status of the executed command will be written to this * variable. *

* @return string|false the last line of the command output on success, and false * on failure. */ function system(string $command, &$result_code): string|false {} /** * Escape shell metacharacters * @link https://php.net/manual/en/function.escapeshellcmd.php * @param string $command

* The command that will be escaped. *

* @return string The escaped string. */ #[Pure] function escapeshellcmd(string $command): string {} /** * Escape a string to be used as a shell argument * @link https://php.net/manual/en/function.escapeshellarg.php * @param string $arg

* The argument that will be escaped. *

* @return string The escaped string. */ #[Pure] function escapeshellarg(string $arg): string {} /** * Execute an external program and display raw output * @link https://php.net/manual/en/function.passthru.php * @param string $command

* The command that will be executed. *

* @param int &$result_code [optional]

* If the return_var argument is present, the * return status of the Unix command will be placed here. *

* @return bool|null null on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'null|false'], default: 'null|bool')] function passthru(string $command, &$result_code): ?bool {} /** * Execute command via shell and return the complete output as a string * @link https://php.net/manual/en/function.shell-exec.php * @param string $command

* The command that will be executed. *

* @return string|false|null The output from the executed command or NULL if an error occurred or the command produces no output. */ function shell_exec(string $command): string|false|null {} /** * Execute a command and open file pointers for input/output * @link https://php.net/manual/en/function.proc-open.php * @param array|string $command

* Execute a command and open file pointers for input/output *

*

* As of PHP 7.4.0, cmd may be passed as array of command parameters. * In this case the process will be opened directly * (without going through a shell) and PHP will take care of any * necessary argument escaping. *

* @param array $descriptor_spec

* An indexed array where the key represents the descriptor number and the * value represents how PHP will pass that descriptor to the child * process. 0 is stdin, 1 is stdout, while 2 is stderr. *

*

* Each element can be: * An array describing the pipe to pass to the process. The first * element is the descriptor type and the second element is an option for * the given type. Valid types are pipe (the second * element is either r to pass the read end of the pipe * to the process, or w to pass the write end) and * file (the second element is a filename). * A stream resource representing a real file descriptor (e.g. opened file, * a socket, STDIN). *

*

* The file descriptor numbers are not limited to 0, 1 and 2 - you may * specify any valid file descriptor number and it will be passed to the * child process. This allows your script to interoperate with other * scripts that run as "co-processes". In particular, this is useful for * passing passphrases to programs like PGP, GPG and openssl in a more * secure manner. It is also useful for reading status information * provided by those programs on auxiliary file descriptors. *

* @param array &$pipes

* Will be set to an indexed array of file pointers that correspond to * PHP's end of any pipes that are created. *

* @param string|null $cwd [optional]

* The initial working dir for the command. This must be an * absolute directory path, or null * if you want to use the default value (the working dir of the current * PHP process) *

* @param array|null $env_vars [optional]

* An array with the environment variables for the command that will be * run, or null to use the same environment as the current PHP process *

* @param array|null $options [optional]

* Allows you to specify additional options. Currently supported options * include: * suppress_errors (windows only): suppresses errors generated by this * function when it's set to TRUE * generated by this function when it's set to true * bypass_shell (windows only): bypass cmd.exe shell when set to TRUE * context: stream context used when opening files * (created with stream_context_create) * blocking_pipes: (windows only): force blocking pipes when set to TRUE * create_process_group (windows only): allow the child process to handle * CTRL events when set to TRUE * create_new_console (windows only): the new process has a new console, * instead of inheriting its parent's console *

* @return resource|false a resource representing the process, which should be freed using * proc_close when you are finished with it. On failure * returns false. */ function proc_open(array|string $command, array $descriptor_spec, &$pipes, ?string $cwd, ?array $env_vars, ?array $options) {} /** * Close a process opened by {@see proc_open} and return the exit code of that process * @link https://php.net/manual/en/function.proc-close.php * @param resource $process

* The proc_open resource that will * be closed. *

* @return int the termination status of the process that was run. */ function proc_close($process): int {} /** * Kills a process opened by proc_open * @link https://php.net/manual/en/function.proc-terminate.php * @param resource $process

* The proc_open resource that will * be closed. *

* @param int $signal [optional]

* This optional parameter is only useful on POSIX * operating systems; you may specify a signal to send to the process * using the kill(2) system call. The default is * SIGTERM. *

* @return bool the termination status of the process that was run. */ function proc_terminate($process, int $signal = 15): bool {} /** * Get information about a process opened by {@see proc_open} * @link https://php.net/manual/en/function.proc-get-status.php * @param resource $process

* The proc_open resource that will * be evaluated. *

* @return array|false An array of collected information on success, and false * on failure. The returned array contains the following elements: *

*

* elementtypedescription * * command * string * * The command string that was passed to proc_open. * * * * pid * int * process id * * * running * bool * * true if the process is still running, false if it has * terminated. * * * * signaled * bool * * true if the child process has been terminated by * an uncaught signal. Always set to false on Windows. * * * * stopped * bool * * true if the child process has been stopped by a * signal. Always set to false on Windows. * * * * exitcode * int * * The exit code returned by the process (which is only * meaningful if running is false). * Only first call of this function return real value, next calls return * -1. * * * * termsig * int * * The number of the signal that caused the child process to terminate * its execution (only meaningful if signaled is true). * * * * stopsig * int * * The number of the signal that caused the child process to stop its * execution (only meaningful if stopped is true). * * */ #[ArrayShape(["command" => "string", "pid" => "int", "running" => "bool", "signaled" => "bool", "stopped" => "bool", "exitcode" => "int", "termsig" => "int", "stopsig" => "int"])] #[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] function proc_get_status($process) {} /** * Change the priority of the current process.
* Since 7.2.0 supported on Windows platforms. * @link https://php.net/manual/en/function.proc-nice.php * @param int $priority

* The increment value of the priority change. *

* @return bool true on success or false on failure. * If an error occurs, like the user lacks permission to change the priority, * an error of level E_WARNING is also generated. */ function proc_nice(int $priority): bool {} /** * Get port number associated with an Internet service and protocol * @link https://php.net/manual/en/function.getservbyname.php * @param string $service

* The Internet service name, as a string. *

* @param string $protocol

* protocol is either "tcp" * or "udp" (in lowercase). *

* @return int|false the port number, or false if service or * protocol is not found. */ #[Pure] function getservbyname(string $service, string $protocol): int|false {} /** * Get Internet service which corresponds to port and protocol * @link https://php.net/manual/en/function.getservbyport.php * @param int $port

* The port number. *

* @param string $protocol

* protocol is either "tcp" * or "udp" (in lowercase). *

* @return string|false the Internet service name as a string. */ #[Pure] function getservbyport(int $port, string $protocol): string|false {} /** * Get protocol number associated with protocol name * @link https://php.net/manual/en/function.getprotobyname.php * @param string $protocol

* The protocol name. *

* @return int|false the protocol number or -1 if the protocol is not found. */ #[Pure] function getprotobyname(string $protocol): int|false {} /** * Get protocol name associated with protocol number * @link https://php.net/manual/en/function.getprotobynumber.php * @param int $protocol

* The protocol number. *

* @return string|false the protocol name as a string. */ #[Pure] function getprotobynumber(int $protocol): string|false {} /** * Gets PHP script owner's UID * @link https://php.net/manual/en/function.getmyuid.php * @return int|false the user ID of the current script, or false on error. */ #[Pure] function getmyuid(): int|false {} /** * Get PHP script owner's GID * @link https://php.net/manual/en/function.getmygid.php * @return int|false the group ID of the current script, or false on error. */ #[Pure] function getmygid(): int|false {} /** * Gets PHP's process ID * @link https://php.net/manual/en/function.getmypid.php * @return int|false the current PHP process ID, or false on error. */ #[Pure] function getmypid(): int|false {} /** * Gets the inode of the current script * @link https://php.net/manual/en/function.getmyinode.php * @return int|false the current script's inode as an integer, or false on error. */ #[Pure] function getmyinode(): int|false {}