php-extended / polyfill-php74-mb-str-split
This package is abandoned and no longer maintained.
The author suggests using the php >= 7.4 package instead.
A polyfill that adds the mb_str_split function added in php7.4 to previous versions of php
1.3.0
2023-06-30 20:44 UTC
Requires
- php: >=7.3
Requires (Dev)
README
A polyfill that adds the php74 mb_str_split function added in php7.4 to previous versions of php.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/polyfill-php74-mb-str-split": "^1"
Basic Usage
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']
License
MIT (See license file).