Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
IntlChar getUnicodeVersion() function in PHP
The IntlChar getUnicodeVersion() function is used to get the Unicode version that the ICU library is using. It returns an array containing version numbers that represent the Unicode standard version.
Syntax
array IntlChar::getUnicodeVersion()
Parameters
This function takes no parameters.
Return Value
The IntlChar getUnicodeVersion() function returns an array containing four integers representing the Unicode version number in the format [major, minor, micro, update].
Example
The following example demonstrates how to get the Unicode version ?
<?php
var_dump(IntlChar::getUnicodeVersion());
?>
The output of the above code is ?
array(4) { [0]=> int(6) [1]=> int(3) [2]=> int(0) [3]=> int(0) }
Understanding the Output
The returned array contains four elements representing the Unicode version:
Index 0: Major version number
Index 1: Minor version number
Index 2: Micro version number
Index 3: Update version number
In the example output, the version array [6, 3, 0, 0] represents Unicode version 6.3.0.0.
Conclusion
The IntlChar::getUnicodeVersion() function is useful for determining which Unicode standard version your PHP installation supports, helping ensure compatibility when working with international characters and text processing.
