php8.5
Home/ Manual/ intl / intlchar/ IntlChar::isprint

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

codepoint

Parameter

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

Source: reference/intl/intlchar/isprint.xml · from the official PHP manual (php/doc-en)