php8.5
Home/ Manual/ intl / intlchar/ IntlChar::getBidiPairedBracket

IntlChar::getBidiPairedBracket

PHP function Edit on GitHub ✎

(PHP 7, PHP 8)

Get the paired bracket character for a code point

Description

IntlChar::getBidiPairedBracket(int|string $codepoint): int|string|null

Maps the specified character to its paired bracket character.

For IntlChar::PROPERTY_BIDI_PAIRED_BRACKET_TYPE !== IntlChar::BPT_NONE, this is the same as IntlChar::charMirror(). Otherwise codepoint itself is returned.

Parameters

codepoint

Parameter

Return Values

Returns the paired bracket code point, or codepoint itself if there is no such mapping. Returns null on failure.

Return

Examples

Example

php
<?php
var_dump(IntlChar::getBidiPairedBracket(91));
var_dump(IntlChar::getBidiPairedBracket('['));
?>

The above example will output:

output
int(93)
string(1) "]"

Notes

Note

This method is available as of ICU version 52.

See Also

Source: reference/intl/intlchar/getbidipairedbracket.xml · from the official PHP manual (php/doc-en)