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 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 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 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:39:51
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:37:45
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:34:46
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:34:40
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:34:31
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:34:24
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:34:11
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:29:25
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim ctype_alpha chr ord
added at:
2025-04-09 16:29:10
1
-
PHP 8.4 / MySQL 8.0 strtoupper trim str_split ctype_alpha chr ord
added at:
2025-04-09 16:29:04
1