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 −

<?php
   var_dump(IntlChar::isdefined("Z"));
   echo "<br>";
   var_dump(IntlChar::isdefined(" "));
   echo "<br>";
   var_dump(IntlChar::isdefined("HJHK"));
   echo "<br>";
   var_dump(IntlChar::isdefined("89"));
?>

Output

The following is the output −

bool(true)
bool(true)
NULL
NULL

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 31-Dec-2019

35 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements