PHP IntlChar function getIntPropertyValue ()

Syntax:
int IntlChar::getIntPropertyValue ($codepoint, $property)
Parameter:this function takes two parameters as above and described below:
  • $codepoint:input parameter $codepoint - it is a character or integer value that is encoded as a UTF-8 string.
  • $propertyStores a Unicode character constant. Example: IntlChar::PROPERTY_ * constants.
Returned values:
  • It returns a numeric value, which is the property value itself or enumerated properties matches the numeric value of an enumerated constant of the corresponding enumeration type of the property value.
  • Returns a Boolean value (0/1 or FALSE / TRUE) for Unicode binary properties.
  • Returns a bitwise value masks for mask properties.
  • It returns 0 if the property is out of bounds, or if the Unicode version has no data at all for the property, or not for that code point.
The programs below illustrate the IntlChar::getIntPropertyValue() functionin PHP:Program 1:
// Alphabetical input data var_dump (IntlChar::getIntPropertyValue ( " A " , IntlChar::PROPERTY_ALPHABETIC) === 1);
// Input data is of the type of mirror brackets var_dump (IntlChar::getIntPropertyValue ( "[" , IntlChar::PROPERTY_BIDI_MIRRORED) === 1);
// Input data is a space var_dump (IntlChar::getIntPropertyValue ( "" , IntlChar::PROPERTY_POSIX_BLANK) === 1);
// The input data has a special character type var_dump (IntlChar::getIntPropertyValue ( "?" , IntlChar::PROPERTY_BLOCK) === IntlChar::BLOCK_CODE_GREEK);
?>
Exit:
bool (true ) bool (true) bool (true) bool (false)
Program 2: < ? php
// Alphabetical input data var_dump (IntlChar::getIntPropertyValue ( "A" , IntlChar::PROPERTY_ALPHABETIC) === 1);
// The input data has a special character type var_dump (IntlChar::getIntPropertyValue ( "|" , IntlChar::PROPERTY_BIDI_MIRRORED) === 1);
// The input data has a special character type var_dump (IntlChar::getIntPropertyValue ( "?" , IntlChar::PROPERTY_BLOCK) === IntlChar::BLOCK_CODE_GREEK);
// Input data is of numeric type var_dump (IntlChar::getIntPropertyValue ( "9" , IntlChar::PROPERTY_NUMERIC_TYPE) === 1);
// Math type input var_dump (IntlChar::getIntPropertyValue ( "=" , IntlChar::PROPERTY_MATH) === 1);
?>
Exit:
bool (true ) bool (false) bool (false) bool (true) bool (true)
Link:https://www.php.net/manual/en/intlchar.getintpropertyvalue.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method