IntlChar isdefined() function in PHP

The IntlChar isdefined() function checks whether the entered value is defined or not.

Syntax

bool IntlChar::isdefined (val)

Parameters

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

Return

The IntlChar isdefined() function returns TRUE if val is a defined character.

Example

The following is an example −

";
   var_dump(IntlChar::isdefined(" "));
   echo "
";    var_dump(IntlChar::isdefined("HJHK"));    echo "
";    var_dump(IntlChar::isdefined("89")); ?>

Output

The following is the output −

bool(true)
bool(true)
NULL
NULL
Updated on: 2019-12-31T06:36:29+05:30

123 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements