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 / MySQL 5.7 base64_decode preg_match_all count str_replace chr hexdec preg_match
last run:
2023-11-12 20:14:19
17
- PHP 8.1 / MySQL 5.7 strlen ctype_alpha ord ctype_upper chr
last run:
2023-11-24 18:11:00
7
- PHP 8.1 / MySQL 5.7 base64_decode preg_match_all count str_replace chr hexdec preg_match
last run:
2023-07-14 22:57:26
7
- PHP 8.1 / MySQL 5.7 strlen ctype_upper chr
last run:
2023-11-24 18:04:10
6
- PHP 8.1 / MySQL 5.7 preg_match_all count str_replace chr hexdec preg_match base64_decode
last run:
2023-07-14 22:48:59
3
- PHP 8.1 / MySQL 5.7 strlen ord chr
last run:
2024-03-27 11:44:14
2
- PHP 8.1 / MySQL 5.7 strlen ord chr
last run:
2024-03-27 11:44:08
2
- PHP 8.1 / MySQL 5.7 strlen ord chr
last run:
2024-03-27 11:42:29
2
- PHP 8.1 / MySQL 5.7 rand chr
last run:
2023-12-07 05:53:45
2
- PHP 8.1 / MySQL 5.7 strlen ctype_alpha ord ctype_upper chr
last run:
2023-11-24 18:10:37
2
chr - New snippets
-
PHP 8.1 / MySQL 5.7 chr
added at:
2024-04-18 18:00:39
1
-
PHP 8.1 / MySQL 5.7 chr
added at:
2024-04-18 18:00:24
1
-
PHP 8.1 / MySQL 5.7 chr print_r
added at:
2024-03-27 11:58:34
1
-
PHP 8.1 / MySQL 5.7 chr print_r
added at:
2024-03-27 11:58:30
1
-
PHP 8.1 / MySQL 5.7 strlen ord chr
added at:
2024-03-27 11:43:42
2
-
PHP 8.1 / MySQL 5.7 strlen ord chr
added at:
2024-03-27 11:43:24
2
-
PHP 8.1 / MySQL 5.7 strlen ord chr
added at:
2024-03-27 11:42:26
2
-
PHP 8.1 / MySQL 5.7 strlen ord chr
added at:
2024-03-27 11:42:04
1
-
PHP 8.1 / MySQL 5.7 rand chr rand chr
added at:
2023-12-07 05:53:35
2