IntlChar::isprint
PHP function
Edit on GitHub ✎
(PHP 7, PHP 8)
Check if code point is a printable character
Description
IntlChar::isprint(int|string $codepoint): bool|null
Determines whether the specified code point is a printable character.
true for general categories other than "C" (controls).
Parameters
codepointParameter
Return Values
Returns true if codepoint is a printable character, false if not. Returns null on failure.
Examples
Example
php
<?php
var_dump(IntlChar::isprint("A"));
var_dump(IntlChar::isprint(" "));
var_dump(IntlChar::isprint("\n"));
var_dump(IntlChar::isprint("\u{200e}"));
?>The above example will output:
output
bool(true)
bool(true)
bool(false)
bool(false)See Also
IntlChar::iscntrl()IntlChar::PROPERTY_DEFAULT_IGNORABLE_CODE_POINTctype_print()