Code Duplication    Length = 4-5 lines in 2 locations

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;

class/Utility.php 1 location

@@ 1308-1312 (lines=5) @@
1305
            else {
1306
                return false;
1307
            } # Does not match any model
1308
            for ($j = 0; $j < $n; ++$j) { # n bytes matching 10bbbbbb follow ?
1309
                if ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80)) {
1310
                    return false;
1311
                }
1312
            }
1313
        }
1314
1315
    return true;