Code Duplication    Length = 4-5 lines in 2 locations

class/Utility.php 1 location

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

include/functions.php 1 location

@@ 727-730 (lines=4) @@
724
        elseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb
725
        elseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b
726
        else return false; # Does not match any model
727
        for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?
728
            if ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80))
729
            return false;
730
        }
731
    }
732
733
    return true;