![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 digit() function in PHP
The IntlChar digit() function is used to display the decimal digit value of a code point for a given radix.
Syntax
int IntlChar::digit( $val, $radix )
Parameters
val − An integer or character encoded as a UTF-8 string.
radix − The radix value. Default is 10.
Return
The IntlChar digit() function returns the number represented by the character in the given radix.
Example
The following is an example −
<?php var_dump(IntlChar::digit("2")); echo "<br>"; var_dump(IntlChar::digit("Z")); echo "<br>"; var_dump(IntlChar::digit("6", 2)); ?>
Output
The following is the output −
int(2) bool(false) bool(false)
Advertisements