PHP | IntlChar hasBinaryProperty() function Last Updated : 27 Aug, 2019 Comments Improve Suggest changes Like Article Like Report 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: $codepoint: The $codepoint value is an integer values or character, which is encoded as a UTF-8 string. $property: This stores the IntlChar::PROPERTY_* constants. Return Value: This function returns boolean value (true or false) based on binary Unicode property. Below programs illustrate the IntlChar::hasBinaryProperty() function in PHP: Program 1: php <?php // PHP function to illustrate the use of // IntlChar::hasBinaryProperty() function // Input data is character type var_dump(IntlChar::hasBinaryProperty("G", IntlChar::PROPERTY_ALPHABETIC)); // Input data is string type var_dump(IntlChar::hasBinaryProperty("Geeks", IntlChar::PROPERTY_ALPHABETIC)); // Input data is mirrored bracket character type var_dump(IntlChar::hasBinaryProperty("}", IntlChar::PROPERTY_BIDI_MIRRORED)); // Input data is character type var_dump(IntlChar::hasBinaryProperty("%", IntlChar::PROPERTY_BIDI_MIRRORED)); ?> Output: bool(true) NULL bool(true) bool(false) Program 2: php <?php // PHP function to illustrate the use of // IntlChar::hasBinaryProperty() function // Declare an array $arr $arr = array("A", "{", "^", ")", "6", "Geeks", "))"); // Loop run for every array element foreach ($arr as $val){ // Check each element as code point data var_dump(IntlChar::hasBinaryProperty($val, IntlChar::PROPERTY_BIDI_MIRRORED)); } ?> Output: bool(false) bool(true) bool(false) bool(true) bool(false) NULL NULL Reference: https://www.php.net/manual/en/intlchar.hasbinaryproperty.php Comment R R_Raj Follow 0 Improve R R_Raj Follow 0 Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Explore PHP Tutorial 8 min read BasicsPHP Syntax 4 min read PHP Variables 5 min read PHP | Functions 8 min read PHP Loops 4 min read ArrayPHP Arrays 5 min read PHP Associative Arrays 4 min read Multidimensional arrays in PHP 5 min read Sorting Arrays in PHP 4 min read OOPs & InterfacesPHP Classes 2 min read PHP | Constructors and Destructors 5 min read PHP Access Modifiers 4 min read Multiple Inheritance in PHP 4 min read MySQL DatabasePHP | MySQL Database Introduction 4 min read PHP Database connection 2 min read PHP | MySQL ( Creating Database ) 3 min read PHP | MySQL ( Creating Table ) 3 min read PHP AdvancePHP Superglobals 6 min read PHP | Regular Expressions 12 min read PHP Form Handling 4 min read PHP File Handling 4 min read PHP | Uploading File 3 min read PHP Cookies 9 min read PHP | Sessions 7 min read Like