A polyfill that adds the mb_str_split function added in php7.4 to previous versions of php
A polyfill that adds the php74 mb_str_split function added in php7.4 to previous versions of php.
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
composer.pharfrom their website.
- Then run the following command to install this library as dependency :
php composer.phar php-extended/polyfill-php74-mb-str-split": "^1"
This library gives the function
mb_str_split(string $string , int $length = 1 , ?string $encoding = null) : string :
$res = \mb_str_split('foobar', 3, 'UTF-8'); // $res is ['foo', 'bar']
MIT (See license file).