mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 02:24:26 +00:00
Remove test functions in loop whenever it's possible
This commit is contained in:
@@ -1586,8 +1586,9 @@ class unicode
|
||||
|
||||
$out = '';
|
||||
$_map = &self::$map[$target]; // faster in loop
|
||||
$length = mb_strlen($string, 'UTF-8');
|
||||
|
||||
for ($i = 0; $i < mb_strlen($string, 'UTF-8'); $i++) {
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
if (true === array_key_exists(($c = mb_substr($string, $i, 1, 'UTF-8')), $_map)) {
|
||||
$out .= $_map[$c];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user