PHP | IntlChar getBidiPairedBracket() Function Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report 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 ( $codepoint ) Parameters: This function accepts single parameter $codepoint which is mandatory. The $codepoint value is an integer values or character, which is encoded as a UTF-8 string. Return Value: This function returns the mapped paired bracket. If the character has no pair bracket then it returns the character itself. Below programs illustrate the IntlChar::getBidiPairedBracket() function in PHP: Program 1: php <?php // PHP function to illustrate // the use of IntlChar::getBidiPairedBracket() // Input data is number type var_dump(IntlChar::getBidiPairedBracket(91)); // Input data is bracket character type var_dump(IntlChar::getBidiPairedBracket('[')); // Input data is bracket character type var_dump(IntlChar::getBidiPairedBracket('}')); // Input data is bracket character type var_dump(IntlChar::getBidiPairedBracket('"')); // Input data is string type var_dump(IntlChar::getBidiPairedBracket('ABC')); // Input data is character type var_dump(IntlChar::getBidiPairedBracket('A')); ?> Output: int(93) string(1) "]" string(1) "{" string(1) """ NULL string(1) "A" Program 2: php <?php // PHP code to illustrate the // IntlChar::getBidiPairedBracket() function // Declare an array $arr $arr = array("G", "{", "^", ")", "6", "{}", "))", "\t"); // Loop run for every array element foreach ($arr as $val){ // Check each element as code point data var_dump(IntlChar::getBidiPairedBracket($val)); } ?> Output: string(1) "G" string(1) "}" string(1) "^" string(1) "(" string(1) "6" NULL NULL string(1) " " Related Articles: PHP | IntlChar::totitle() Function PHP | IntlChar::iscntrl() Function PHP | IntlChar charType() Function Reference: https://www.php.net/manual/en/intlchar.getbidipairedbracket.php Comment More infoAdvertise with us Next Article PHP | IntlChar getBlockCode() Function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP PHP-function PHP-Intl +1 More Practice Tags : Misc Similar Reads PHP | IntlChar getPropertyName() Function 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" / " 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 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 getBlockCode() Function The IntlChar::getBlockCode() function is an inbuilt function in PHP which is used to get the Unicode allocation block containing the code point. This function returns the Unicode allocation block that contains the character. Syntax: int IntlChar::getBlockCode ( $codepoint ) Parameters: This function 2 min read PHP | IntlChar getBlockCode() Function The IntlChar::getBlockCode() function is an inbuilt function in PHP which is used to get the Unicode allocation block containing the code point. This function returns the Unicode allocation block that contains the character. Syntax: int IntlChar::getBlockCode ( $codepoint ) Parameters: This function 2 min read PHP | IntlChar getBlockCode() Function The IntlChar::getBlockCode() function is an inbuilt function in PHP which is used to get the Unicode allocation block containing the code point. This function returns the Unicode allocation block that contains the character. Syntax: int IntlChar::getBlockCode ( $codepoint ) Parameters: This function 2 min read Like