Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • PHP Tutorial
  • PHP Exercises
  • PHP Array
  • PHP String
  • PHP Calendar
  • PHP Filesystem
  • PHP Math
  • PHP Programs
  • PHP Array Programs
  • PHP String Programs
  • PHP Interview Questions
  • PHP GMP
  • PHP IntlChar
  • PHP Image Processing
  • PHP DsSet
  • PHP DsMap
  • PHP Formatter
  • Web Technology
Open In App
Next Article:
PHP | IntlChar enumCharNames() Function
Next article icon

PHP | IntlChar enumCharNames() Function

Last Updated : 28 Jul, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

The IntlChar::enumCharNames() function is an inbuilt function in PHP which is used to give a catalog of all the assigned Unicode characters that are available within a range. The list will have the Unicode characters that are available between the start code points (start inclusive) and the limit code points (limit exclusive). A function is going to be called for each and the code point value will be passed on along with the character name. Those who are different from the new & modern names, only those will get cataloged, for Unicode 1.0 names.
Syntax: 

void IntlChar::enumCharNames( $start, $limit, $callback, $nameChoice = IntlChar::UNICODE_CHAR_NAME )  


Parameters: This function accepts four parameters as mentioned and described below: 

  • start: This parameter holds the first code point in the enumeration range.
  • limit: This parameter holds the one more than the last point in the range.
  • callback: For each character name the function that is supposed to be called. This function accepts three parameters which are listed below: 
    • $codepoint: It holds the value of numeric code point.
    • $nameChoice: It holds the value of nameChoice.
    • $name: It holds the name of the character.
  • nameChoice: The kinds of name, that has to be enumerated. It could be any of these five given constants: 
    • IntlChar::UNICODE_CHAR_NAME (the default constant)
    • IntlChar::CHAR_NAME_ALIAS
    • IntlChar::CHAR_NAME_CHOICE_COUNT
    • IntlChar::EXTENDED_CHAR_NAME
    • IntlChar::UNICODE_10_CHAR_NAME


Return Values: This function does not return any value.
Below program illustrates the IntlChar::enumCharNames() function in PHP:
Program: 

php
<?php  // PHP program to uses IntlChar::enumCharNames() // function IntlChar::enumCharNames(0x2700, 0x2710,      function($codepoint, $nameChoice, $name) {         printf("U+%04x %s\n", $codepoint, $name); });  ?> 

Output: 

U+2700 BLACK SAFETY SCISSORS U+2701 UPPER BLADE SCISSORS U+2702 BLACK SCISSORS U+2703 LOWER BLADE SCISSORS U+2704 WHITE SCISSORS U+2705 WHITE HEAVY CHECK MARK U+2706 TELEPHONE LOCATION SIGN U+2707 TAPE DRIVE U+2708 AIRPLANE U+2709 ENVELOPE U+270a RAISED FIRST U+270b RAISED HAND U+270c VICTORY HAND U+270d WRITING HAND U+270e LOWER RIGHT PENCIL U+270f PENCIL


Reference: https://www.php.net/manual/en/intlchar.enumcharnames.php


Next Article
PHP | IntlChar enumCharNames() Function

S

SohomPramanick
Improve
Article Tags :
  • Web Technologies
  • PHP
  • PHP-function
  • PHP-Intl

Similar Reads

    PHP IntlChar::charName() Function
    PHP IntlChar::charName() function is an inbuilt function in PHP used to retrieve the name of a Unicode character. Syntax: string IntlChar::charName( $codepoint [, $nameChoice = IntlChar::UNICODE_CHAR_NAME] ) Parameters: This function accepts two parameters as mentioned above and described below: $co
    2 min read
    PHP | IntlChar enumCharTypes() Function
    The IntlChar::enumCharTypes() function is an inbuilt function in PHP which is used to give a catalog of all the code points with their Unicode general categories. All the cataloging happens very efficiently of all the code points. For enumerating all the assigned code points and building data struct
    2 min read
    PHP | IntlChar::charAge() Function
    The IntlChar::charAge() function is an inbuilt function in PHP which is used to calculate the age of code point. Where the age is Unicode version when the code point was first designated or assigned a character. This can be useful to avoid emitting code points to receiving processes that do not acce
    2 min read
    PHP | IntlChar charFromName() Function
    The IntlChar::charFromName() function is an inbuilt function in PHP which is used to find Unicode character by name and returns the code point value. If Unicode character name does not match to a code point, then it returns NULL. Syntax: int IntlChar::charFromName( $characterName, $nameChoice = Intl
    2 min read
    PHP | IntlChar::chr() Function
    The IntlChar::chr() function is an inbuilt function in PHP which is used to check whether the given input character is Unicode code point value or not. It returns Unicode character by code point value.Syntax: string IntlChar::chr( $codepoint ) Parameters: This function accepts a single parameter $co
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences