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 Create Quiz Comment V vijay_raj Follow 0 Improve V vijay_raj Follow 0 Improve Article Tags : Misc Web Technologies PHP PHP-function PHP-Intl +1 More Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like