Remove paragonie/random_compat (not required for PHP 7)

This commit is contained in:
Frédéric Guillot
2020-06-02 20:16:16 -07:00
parent 25f3f6f2d2
commit 884a8eb2c4
33 changed files with 224 additions and 1601 deletions

View File

@@ -545,7 +545,14 @@ final class Mbstring
}
if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
return preg_split("/(.{{$split_length}})/u", $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$rx = '/(';
while (65535 < $split_length) {
$rx .= '.{65535}';
$split_length -= 65535;
}
$rx .= '.{'.$split_length.'})/us';
return preg_split($rx, $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
}
$result = array();