Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.66 KB

polyfill_intl_grapheme.rst

File metadata and controls

58 lines (43 loc) · 1.66 KB
.. index::
    single: Polyfill
    single: Intl
    single: Components; Polyfill

The Symfony Polyfill / Intl Grapheme Component

This component provides a partial, native PHP implementation of the grapheme_* functions to users who run PHP versions without the intl extension.

Installation

$ composer require symfony/polyfill-intl-grapheme

Usage

Once this component is installed in your application, you can use the following constants and functions, no matter if the PHP intl extension is installed or not in your server.

Provided Constants

  • GRAPHEME_EXTR_COUNT (value = 0)
  • GRAPHEME_EXTR_MAXBYTES (value = 1)
  • GRAPHEME_EXTR_MAXCHARS (value = 2)

Provided Functions

.. seealso::

    Symfony provides more polyfills for other classes and functions related to
    the Intl PHP extension:
    :doc:`polyfill-intl-icu </components/polyfill_intl_icu>`,
    :doc:`polyfill-intl-idn </components/polyfill_intl_idn>`,
    :doc:`polyfill-intl-messageformatter </components/polyfill_intl_messageformatter>`,
    and :doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`.