IntlChar::isprint() function in PHP

The IntlChar::isprint() function checks whether the given input character is a printable character or not.

Syntax

IntlChar::isprint( val )

Parameters

  • val − An integer values or character encoded as a UTF-8 string. Required!

Return

The IntlChar::isprint() function returns TRUE if the val is a printable character

Example

The following is an example −

";
   var_dump(IntlChar::isprint("&&"));
   echo "
";    var_dump(IntlChar::isprint("K")); ?>

Output

The following is the output −

bool(true)
bool(true)
bool(false)

Example

Let us see another example −

";
   var_dump(IntlChar::isprint("1"));
   echo "
";    var_dump(IntlChar::isprint("hvhj165e615")); ?>

Output

The following is the output −

NULL
bool(true)
NULL
Updated on: 2019-12-30T07:37:57+05:30

182 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements