Change language

PHP IntlChar hasBinaryProperty () function

Syntax:
bool IntlChar::hasBinaryProperty ($codepoint, $property)
Parameters:this function takes two parameters as above and described below:
  • $codepoint:$codepoint is an integer value or a character that is encoded into as a UTF-8 string.
  • $property:stores IntlChar::PROPERTY_ * constants.
Returned value: this function returns a boolean value (true or false) based on a binary Unicode property.The following programs illustrate the IntlChar::hasBinaryProperty() functionin PHP:Program 1:  
// PHP function for illustration use anya
// IntlChar::hasBinaryProperty() function 
// Input data is of character type var_dump (IntlChar::hasBinaryProperty ( "G" , IntlChar::PROPERTY_ALPHABETIC));  
// Input data is of string type var_dump (IntlChar::hasBinaryProperty ( "Geeks" , IntlChar::PROPERTY_ALPHABETIC));  
// Input data is of the type of mirror brackets var_dump (IntlChar::hasBinaryProperty ( "}" , IntlChar: : PROPERTY_BIDI_MIRRORED));  
// Input data is of character type var_dump (IntlChar::hasBinaryProperty ( "%" , IntlChar::PROPERTY_BIDI_MIRRORED)); ?>
Exit:
bool (true ) NULL bool (true) bool (false)
Program 2:  
// PHP function to illustrate usage
// IntlChar::hasBinaryProperty() function 
// Declare the $arr array $arr = array ( "A" , "{" , "^" , ") " , " 6 " , " Geeks " , "))" );  
// run loop for each array element foreach ( $arr as $val ) { // Validate each element as code point data var_dump (IntlChar::hasBinaryProperty ( $val , IntlChar::PROPERTY_BIDI_MIRRORED)); }  
?>
Exit:
bool (false ) bool (true) bool (false) bool (true) bool (false) NULL NULL
Link:https://www.php.net/manual/en/intlchar.hasbinaryproperty.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