IntlChar::charAge() function in PHP


The IntlChar::charAge() function is used to compute the age of the entered value, which is the Unicode version. This is when the value was first designated or assigned a character.

Syntax

array IntlChar::charAge( val)

Parameters

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

Return

The IntlChar::charAge() function returns the Unicode version number of an array, if true.

Example

The following is an example −

<?php
   var_dump(IntlChar::charage("\u{1F878}"));
   echo "<br>";
?>

Output

The following is the output −

array(4) { [0]=> int(0) [1]=> int(0) [2]=> int(0) [3]=> int(0) }

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 30-Dec-2019

68 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements