chr
chr — Find the position of the first occurrence of a substring in a string.Description
chr( int $codepoint ): stringReturns a one-character string containing the character specified by interpreting codepoint as an unsigned integer.
This can be used to create a one-character string in a single-byte encoding such as ASCII, ISO-8859, or Windows 1252, by passing the position of a desired character in the encoding's mapping table. However, note that this function is not aware of any string encoding, and in particular cannot be passed a Unicode code point value to generate a string in a multibyte encoding like UTF-8 or UTF-16.
This function complements ord().
Parameters
codepoint
An integer between 0 and 255.
Return Values
A single-character string containing the specified byte.More information about chr on official PHP documentation site
chr - Popular snippets
- / PostgreSQL 10 Bookings (ReadOnly) chr rand
last run:
2024-07-06 13:51:45
10
- PHP 8.4 / MySQL 8.0 crc32 strlen chr
last run:
2025-04-19 12:38:31
5
- PHP 8.4 / MySQL 8.0 crc32 strlen chr
last run:
2025-04-20 10:44:15
4
- PHP 8.4 / MySQL 8.0 base64_decode explode chr var_dump
last run:
2025-03-26 14:15:38
4
- PHP 8.4 / MySQL 8.0 base64_decode explode chr var_dump
last run:
2025-03-26 13:46:42
4
- PHP 8.4 / MySQL 8.0 base64_decode explode chr var_dump
last run:
2025-03-26 13:36:30
4
- PHP 8.4 / MySQL 8.0 strlen chr ord
last run:
2025-07-07 08:01:05
3
- PHP 8.4 / MySQL 8.0 crc32 strlen chr
last run:
2025-04-19 12:41:55
3
- PHP 8.4 / MySQL 8.0 base64_decode explode chr var_dump
last run:
2025-03-26 14:14:33
3
- PHP 8.4 / MySQL 8.0 base64_decode explode chr var_dump
last run:
2025-03-26 13:48:48
3
chr - New snippets
-
PHP 8.4 / MySQL 8.0 strlen chr ord
added at:
2025-07-07 08:00:27
3
-
PHP 8.3 / MySQL 8.0 base64_decode strlen str_repeat chr openssl_encrypt base64_encode
added at:
2025-06-26 01:40:08
1
-
PHP 8.4 / MySQL 8.0 header base64_decode strrev str_rot13 strlen substr ord chr
added at:
2025-06-07 08:40:18
1
-
PHP 8.4 / MySQL 8.0 range chr preg_match
added at:
2025-05-29 11:03:51
1
-
PHP 8.4 / MySQL 8.0 chr preg_match
added at:
2025-05-29 11:02:55
1
-
PHP 8.4 / MySQL 8.0 ord strlen chr
added at:
2025-05-29 03:26:22
1
-
PHP 8.4 / MySQL 8.0 function_exists crc32 strlen chr
added at:
2025-04-20 10:49:24
1
-
PHP 8.4 / MySQL 8.0 crc32 strlen chr
added at:
2025-04-20 10:48:38
1
-
PHP 8.4 / MySQL 8.0 crc32 strlen chr
added at:
2025-04-19 12:43:05
4
-
PHP 8.4 / MySQL 8.0 crc32 strlen chr
added at:
2025-04-19 12:39:57
3