Skip to content
geeksforgeeks
  • 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
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • 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 getIntPropertyValue() Function
Next article icon

PHP | IntlChar getPropertyName() Function

Last Updated : 13 Sep, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The IntlChar::getPropertyName() function is an inbuilt function in PHP which is used to get the Unicode name for a given property which is given in the Unicode database file PropertyAliases.txt. This function maps the property IntlChar::PROPERTY_GENERAL_CATEGORY_MASK to the synthetic names “gcm” / “General_Category_Mask” which are not in the PropertyAliases.txt. This function is the compliments of IntlChar::getPropertyEnum() function.
 

Syntax:  

string IntlChar::getPropertyName( $property, $nameChoice =  IntlChar::LONG_PROPERTY_NAME )

Parameters: This function accepts two parameters as mentioned above and described below:  

  • $property: This parameter holds the Unicode Property constants (IntlChar::PROPERTY_* constants) 
    The list of property constants are: 
    • IntlChar::PROPERTY_ALPHABETIC
    • IntlChar::PROPERTY_BIDI_MIRRORED
    • IntlChar::PROPERTY_BIDI_CLASS
    • IntlChar::PROPERTY_DASH
    • IntlChar::PROPERTY_IDEOGRAPHIC
    • IntlChar::PROPERTY_LOWERCASE
    • IntlChar::PROPERTY_MATH
    • IntlChar::PROPERTY_UPPERCASE
    • IntlChar::PROPERTY_WHITE_SPACE etc…
  • $nameChoice This parameter holds the selector which gets the which Unicode name.

Return Values: This function returns the name on success or False if either the property or name choice is out of range.
Below programs illustrate the IntlChar::getPropertyName() function in PHP:
Program 1: 

php




<?php
// Program illustrates the IntlChar::getPropertyName() function
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_BIDI_MIRRORED));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_BIDI_MIRRORED,
        IntlChar::SHORT_PROPERTY_NAME));
         
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_BIDI_MIRRORED,
        IntlChar::LONG_PROPERTY_NAME));
         
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_BIDI_MIRRORED,
        IntlChar::LONG_PROPERTY_NAME + 1));
 
?>
 
 
Output: 
string(13) "Bidi_Mirrored" string(6) "Bidi_M" string(13) "Bidi_Mirrored" bool(false)

 

Program 2: 

php




<?php
// Program illustrates the IntlChar::getPropertyName() function
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_IDEOGRAPHIC));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_IDEOGRAPHIC,
        IntlChar::SHORT_PROPERTY_NAME));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_IDEOGRAPHIC,
        IntlChar::LONG_PROPERTY_NAME));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_IDEOGRAPHIC,
        IntlChar::LONG_PROPERTY_NAME + 1));
?>
 
 
Output: 
string(11) "Ideographic" string(4) "Ideo" string(11) "Ideographic" bool(false)

 

Program 3: 

php




<?php
// Program illustrates the IntlChar::getPropertyName() function
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_GENERAL_CATEGORY_MASK));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_GENERAL_CATEGORY_MASK,
        IntlChar::SHORT_PROPERTY_NAME));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_GENERAL_CATEGORY_MASK,
        IntlChar::LONG_PROPERTY_NAME));
 
var_dump(IntlChar::getPropertyName(IntlChar::PROPERTY_GENERAL_CATEGORY_MASK,
        IntlChar::LONG_PROPERTY_NAME + 1));
 
?>
 
 
Output: 
string(21) "General_Category_Mask" string(3) "gcm" string(21) "General_Category_Mask" bool(false)

 

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



Next Article
PHP | IntlChar getIntPropertyValue() Function

V

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

Similar Reads

  • PHP | IntlChar getPropertyEnum() Function
    The IntlChar::getPropertyEnum() function is an inbuilt function in PHP which is used to get the property constant value for a given property name. The property name is going to be specified in PropertyAliases.txt, which is a Unicode Database file. All types of variants are recognized in this, be it
    2 min read
  • PHP | IntlChar getPropertyValueName() Function
    The IntlChar::getPropertyValueName() function is an inbuilt function in PHP which is used to get the Unicode name for a property value. It will be according to the data present in PropertyValueAliases.txt, which is the Unicode DataBase file. Syntax: string IntlChar::getPropertyValueName( $property,
    2 min read
  • PHP | IntlChar getIntPropertyValue() Function
    The IntlChar::getIntPropertyValue() function is an inbuilt function in PHP which is used to get the value for Unicode property for a code point.Syntax: int IntlChar::getIntPropertyValue( $codepoint, $property ) Parameter: This function accepts two parameters as mentioned above and described below: $
    2 min read
  • PHP | IntlChar getPropertyValueEnum() Function
    The IntlChar getPropertyValueEnum() function is an inbuilt function in PHP which is used to get the property value form the given value. Syntax: int IntlChar::getPropertyValueEnum( $property, $name ) Parameters: This function accepts two parameters as mentioned above and described below: $property:
    1 min read
  • PHP | IntlChar getIntPropertyMinValue() Function
    The IntlChar::getIntPropertyMinValue() function is an inbuilt function in PHP which is used to get the minimum value for a Unicode property. This could be used to access the information as well as manipulating the Unicode characters. For an enumerated/integer/binary Unicode property, this is going t
    1 min read
  • PHP | IntlChar getIntPropertyMaxValue() Function
    The IntlChar::getIntPropertyMaxValue() function is an inbuilt function in PHP which is used to get the maximum value for a Unicode property. This could be used to access the information as well as manipulating the Unicode character. For an enumerated/integer/binary Unicode property, this is going to
    1 min read
  • PHP | IntlChar hasBinaryProperty() function
    The IntlChar::hasBinaryProperty() function is an inbuilt function in PHP which is used to checks a binary Unicode property for a code point. Syntax: bool IntlChar::hasBinaryProperty( $codepoint, $property ) Parameters: This function accepts two parameters as mentioned above and described below: $cod
    2 min read
  • PHP | getprotobyname() Function
    The getprotobyname() function is an inbuilt function in PHP which returns the protocol number for a specified protocol name. Syntax: int getprotobyname( string $name ) Parameters: This function accepts single parameter $name which is required. It specifies the protocol name, like tcp, icmp, udp, ip
    1 min read
  • PHP | IntlChar getNumericValue() Function
    The IntlChar::getNumericValue() function is an inbuilt function in PHP which is used to get the numeric value for a Unicode code point as defined in the Unicode Character Database. Syntax: float IntlChar::getNumericValue( $codepoint ) Parameters: This function accepts a single parameter $codepoint w
    2 min read
  • PHP | IntlChar getBidiPairedBracket() Function
    The IntlChar::getBidiPairedBracket() function is an inbuilt function in PHP which is used to get the paired bracket character for a code point. This function mapped with paired bracket. If the character has no pair bracket then it returns the character itself. Syntax: IntlChar::getBidiPairedBracket
    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