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
- PHP 8.1 / base64_decode preg_match_all count str_replace chr hexdec preg_match
last run:
2025-01-08 10:00:44
18
- / PostgreSQL 10 Bookings (ReadOnly) chr rand
last run:
2024-07-06 13:51:45
10
- PHP 8.1 / strlen ctype_alpha ord ctype_upper chr
last run:
2023-11-24 18:11:00
7
- PHP 8.1 / base64_decode preg_match_all count str_replace chr hexdec preg_match
last run:
2023-07-14 22:57:26
7
- PHP 8.1 / strlen ctype_upper chr
last run:
2023-11-24 18:04:10
6
- 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
chr - New snippets
-
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
-
PHP 8.4 / MySQL 8.0 crc32 strlen chr
added at:
2025-04-19 12:39:17
1
-
PHP 8.4 / MySQL 8.0 strlen chr
added at:
2025-04-19 12:39:03
2
-
PHP 8.4 / MySQL 8.0 crc32 strlen chr
added at:
2025-04-19 12:36:12
5
-
PHP 8.4 / MySQL 8.0 crc32 chr strlen
added at:
2025-04-19 12:23:36
1
-
PHP 8.4 / MySQL 8.0 crc32 chr strlen
added at:
2025-04-19 12:23:32
1
-
PHP 8.4 / MySQL 8.0 crc32 chr strlen
added at:
2025-04-19 12:21:33
1