← All built-ins / chr()

chr()

chr(int $n): string

Parameters

NameTypeDescription
$nintbyte value 0–255

Return value

One-character string for that byte.

Example

echo chr(72) . chr(105), "
";
echo chr(10) == "\n" ? "newline" : "?", "
";
Hi
newline

See also

ord()hex2bin()