* The input charset. *
* @param string $to_encoding* The output charset. *
** If you append the string //TRANSLIT to * out_charset transliteration is activated. This * means that when a character can't be represented in the target charset, * it can be approximated through one or several similarly looking * characters. If you append the string //IGNORE, * characters that cannot be represented in the target charset are silently * discarded. Otherwise, str is cut from the first * illegal character and an E_NOTICE is generated. *
* @param string $string* The string to be converted. *
* @return string|false the converted string or FALSE on failure. */ #[Pure] function iconv(string $from_encoding, string $to_encoding, string $string): string|false {} /** * Convert character encoding as output buffer handler * @link https://php.net/manual/en/function.ob-iconv-handler.php * @param string $contents * @param int $status * @return string See ob_start for information about this handler * return values. */ #[Pure] function ob_iconv_handler(string $contents, int $status): string {} /** * Retrieve internal configuration variables of iconv extension * @link https://php.net/manual/en/function.iconv-get-encoding.php * @param string $type [optional]* The value of the optional type can be: * all * input_encoding * output_encoding * internal_encoding *
* @return string|string[]|false the current value of the internal configuration variable if * successful or FALSE on failure. ** If type is omitted or set to "all", * iconv_get_encoding returns an array that * stores all these variables. *
*/ #[Pure] #[ArrayShape(["input_encoding" => "string", "output_encoding" => "string", "internal_encoding" => "string"])] function iconv_get_encoding(string $type = "all"): array|string|false {} /** * Set current setting for character encoding conversion * @link https://php.net/manual/en/function.iconv-set-encoding.php * @param string $type* The value of type can be any one of these: * input_encoding * output_encoding * internal_encoding *
* @param string $encoding* The character set. *
* @return bool TRUE on success or FALSE on failure. */ function iconv_set_encoding(string $type, string $encoding): bool {} /** * Returns the character count of string * @link https://php.net/manual/en/function.iconv-strlen.php * @param string $string* The string. *
* @param string|null $encoding* If charset parameter is omitted, * str is assumed to be encoded in * iconv.internal_encoding. *
* @return int|false the character count of str, as an integer. False on error. */ #[Pure] function iconv_strlen(string $string, ?string $encoding = null): int|false {} /** * Cut out part of a string * @link https://php.net/manual/en/function.iconv-substr.php * @param string $string* The original string. *
* @param int $offset* If offset is non-negative, * iconv_substr cuts the portion out of * str beginning at offset'th * character, counting from zero. *
** If offset is negative, * iconv_substr cuts out the portion beginning * at the position, offset characters * away from the end of str. *
* @param int|null $length [optional]* If length is given and is positive, the return * value will contain at most length characters * of the portion that begins at offset * (depending on the length of string). *
** If negative length is passed, * iconv_substr cuts the portion out of * str from the offset'th * character up to the character that is * length characters away from the end of the string. * In case offset is also negative, the start position * is calculated beforehand according to the rule explained above. *
* @param string|null $encoding* If charset parameter is omitted, * string are assumed to be encoded in * iconv.internal_encoding. *
** Note that offset and length * parameters are always deemed to represent offsets that are * calculated on the basis of the character set determined by * charset, whilst the counterpart * substr always takes these for byte offsets. *
* @return string|false the portion of str specified by the * offset and length parameters. ** If str is shorter than offset * characters long, FALSE will be returned. *
*/ #[Pure] function iconv_substr(string $string, int $offset, ?int $length, ?string $encoding = null): string|false {} /** * Finds position of first occurrence of a needle within a haystack * @link https://php.net/manual/en/function.iconv-strpos.php * @param string $haystack* The entire string. *
* @param string $needle* The searched substring. *
* @param int $offset [optional]* The optional offset parameter specifies * the position from which the search should be performed. *
* @param string|null $encoding* If charset parameter is omitted, * string are assumed to be encoded in * iconv.internal_encoding. *
* @return int<0,max>|false the numeric position of the first occurrence of * needle in haystack. ** If needle is not found, * iconv_strpos will return FALSE. *
*/ #[Pure] function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {} /** * Finds the last occurrence of a needle within a haystack * @link https://php.net/manual/en/function.iconv-strrpos.php * @param string $haystack* The entire string. *
* @param string $needle* The searched substring. *
* @param string|null $encoding* If charset parameter is omitted, * string are assumed to be encoded in * iconv.internal_encoding. *
* @return int|false the numeric position of the last occurrence of * needle in haystack. ** If needle is not found, * iconv_strrpos will return FALSE. *
*/ #[Pure] function iconv_strrpos(string $haystack, string $needle, ?string $encoding = null): int|false {} /** * Composes a MIME header field * @link https://php.net/manual/en/function.iconv-mime-encode.php * @param string $field_name* The field name. *
* @param string $field_value* The field value. *
* @param array $options* You can control the behaviour of iconv_mime_encode * by specifying an associative array that contains configuration items * to the optional third parameter preferences. * The items supported by iconv_mime_encode are * listed below. Note that item names are treated case-sensitive. *
Item | *Type | *Description | *Default value | *Example | *
scheme | *string | ** Specifies the method to encode a field value by. The value of * this item may be either "B" or "Q", where "B" stands for * base64 encoding scheme and "Q" stands for * quoted-printable encoding scheme. * | *B | *B | *
input-charset | *string | ** Specifies the character set in which the first parameter * field_name and the second parameter * field_value are presented. If not given, * iconv_mime_encode assumes those parameters * are presented to it in the * iconv.internal_encoding * ini setting. * | ** iconv.internal_encoding * | *ISO-8859-1 | *
output-charset | *string | ** Specifies the character set to use to compose the * MIME header. * | ** iconv.internal_encoding * | *UTF-8 | *
line-length | *integer | ** Specifies the maximum length of the header lines. The resulting * header is "folded" to a set of multiple lines in case * the resulting header field would be longer than the value of this * parameter, according to * RFC2822 - Internet Message Format. * If not given, the length will be limited to 76 characters. * | *76 | *996 | *
line-break-chars | *string | ** Specifies the sequence of characters to append to each line * as an end-of-line sign when "folding" is performed on a long header * field. If not given, this defaults to "\r\n" * (CR LF). Note that * this parameter is always treated as an ASCII string regardless * of the value of input-charset. * | *\r\n | *\n | *
* The encoded header, as a string. *
* @param int $mode [optional]* mode determines the behaviour in the event * iconv_mime_decode encounters a malformed * MIME header field. You can specify any combination * of the following bitmasks. *
Value | *Constant | *Description | *
1 | *ICONV_MIME_DECODE_STRICT | ** If set, the given header is decoded in full conformance with the * standards defined in RFC2047. * This option is disabled by default because there are a lot of * broken mail user agents that don't follow the specification and don't * produce correct MIME headers. * | *
2 | *ICONV_MIME_DECODE_CONTINUE_ON_ERROR | ** If set, iconv_mime_decode_headers * attempts to ignore any grammatical errors and continue to process * a given header. * | *
* The optional charset parameter specifies the * character set to represent the result by. If omitted, * iconv.internal_encoding * will be used. *
* @return string|false a decoded MIME field on success, * or FALSE if an error occurs during the decoding. */ #[Pure] function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null): string|false {} /** * Decodes multiple MIME header fields at once * @link https://php.net/manual/en/function.iconv-mime-decode-headers.php * @param string $headers* The encoded headers, as a string. *
* @param int $mode [optional]
* mode determines the behaviour in the event
* iconv_mime_decode_headers encounters a malformed
* MIME header field. You can specify any combination
* of the following bitmasks.
*
* Bitmasks acceptable to iconv_mime_decode_headers
Value | *Constant | *Description | *
1 | *ICONV_MIME_DECODE_STRICT | ** If set, the given header is decoded in full conformance with the * standards defined in RFC2047. * This option is disabled by default because there are a lot of * broken mail user agents that don't follow the specification and don't * produce correct MIME headers. * | *
2 | *ICONV_MIME_DECODE_CONTINUE_ON_ERROR | ** If set, iconv_mime_decode_headers * attempts to ignore any grammatical errors and continue to process * a given header. * | *
* The optional charset parameter specifies the * character set to represent the result by. If omitted, * iconv.internal_encoding * will be used. *
* @return array|false an associative array that holds a whole set of * MIME header fields specified by * encoded_headers on success, or FALSE * if an error occurs during the decoding. ** Each key of the return value represents an individual * field name and the corresponding element represents a field value. * If more than one field of the same name are present, * iconv_mime_decode_headers automatically incorporates * them into a numerically indexed array in the order of occurrence. *
*/ #[Pure] function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $encoding = null): array|false {} /** * string * @link https://php.net/manual/en/iconv.constants.php */ define('ICONV_IMPL', "libiconv"); /** * string * @link https://php.net/manual/en/iconv.constants.php */ define('ICONV_VERSION', 2.17); /** * integer * @link https://php.net/manual/en/iconv.constants.php */ define('ICONV_MIME_DECODE_STRICT', 1); /** * integer * @link https://php.net/manual/en/iconv.constants.php */ define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); // End of iconv v.