The Symfony Polyfill / Mbstring Component

This component provides a partial, native PHP implementation for thembstring PHP extension.

Installation

  1. $ composer require symfony/polyfill-mbstring

Note

If you install this component outside of a Symfony application, you mustrequire the vendor/autoload.php file in your code to enable the classautoloading mechanism provided by Composer. Readthis article for more details.

Usage

Once this component is installed in your application, you can use the followingconstants and functions, no matter if the PHP mbstring extension is installedor not in your server.

Provided Constants

  • MB_CASE_UPPER (value = 0)
  • MB_CASE_LOWER (value = 1)
  • MB_CASE_TITLE (value = 2)

Provided Functions