Code Duplication    Length = 4-5 lines in 2 locations

class/Utility.php 1 location

@@ 1288-1292 (lines=5) @@
1285
            else {
1286
                return false;
1287
            } # Does not match any model
1288
            for ($j = 0; $j < $n; ++$j) { # n bytes matching 10bbbbbb follow ?
1289
                if ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80)) {
1290
                    return false;
1291
                }
1292
            }
1293
        }
1294
1295
    return true;

include/functions.php 1 location

@@ 879-882 (lines=4) @@
876
        elseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb
877
        elseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b
878
        else return false; # Does not match any model
879
        for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?
880
            if ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80))
881
            return false;
882
        }
883
    }
884
885
    return true;