• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • IntlChar::getIntPropertyMaxValue()

    版本:php7

    (PHP 7)

    Get the max value for a Unicode property

    说明

    publicstaticIntlChar::getIntPropertyMaxValue(int $property): int

    Gets the maximum value for an enumerated/integer/binary Unicode property.

    参数

    $property

    The Unicode property to lookup(see theIntlChar::PROPERTY_*constants).

    返回值

    The maximum value returned by IntlChar::getIntPropertyValue() for a Unicode property.<=0if the property selector is out of range.

    范例

    Testing different properties

    <?php
    var_dump(IntlChar::getIntPropertyMaxValue(IntlChar::PROPERTY_BIDI_CLASS));
    var_dump(IntlChar::getIntPropertyMaxValue(IntlChar::PROPERTY_SCRIPT));
    var_dump(IntlChar::getIntPropertyMaxValue(IntlChar::PROPERTY_IDEOGRAPHIC));
    var_dump(IntlChar::getIntPropertyMaxValue(999999999)); // Some made-up value
    ?>
    

    以上例程会输出:

    int(22)
    int(166)
    int(1)
    int(-1)
    

    参见

    • IntlChar::hasBinaryProperty() Check a binary Unicode property for a code point
    • IntlChar::getIntPropertyMinValue() Get the min value for a Unicode property
    • IntlChar::getIntPropertyValue() Get the value for a Unicode property for a code point
    • IntlChar::getUnicodeVersion() Get the Unicode version