![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
IntlChar getBlockCode() function in PHP
The IntlChar getBlockCode() function is used to get the Unicode allocation block containing the value val.
Syntax
IntlChar::getBlockCode (val)
Parameters
val − An integer or character encoded as a UTF-8 string.
Return
The IntlChar getBlockCode()function returns the block value for val. The following is the listing −
IntlChar::BLOCK_CODE_BASIC_LATIN
IntlChar::BLOCK_CODE_GREEK
IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS
Example
The following is an example −
<?php var_dump(IntlChar::getBlockCode("A") === IntlChar::BLOCK_CODE_BASIC_LATIN); echo "<br>"; var_dump(IntlChar::getBlockCode("PQRS") === IntlChar::BLOCK_CODE_BASIC_LATIN); echo "<br>"; var_dump(IntlChar::getBlockCode("u{2603}") === IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS); ?>
Output
The following is the output −
bool(true) bool(false) bool(false)
Advertisements