Code Duplication    Length = 10-10 lines in 2 locations

code/tests/apc.php 1 location

@@ 557-566 (lines=10) @@
554
555
// pretty printer for byte values
556
//
557
function bsize($s)
558
{
559
    foreach (array('', 'K', 'M', 'G') as $i => $k) {
560
        if ($s < 1024) {
561
            break;
562
        }
563
        $s/=1024;
564
    }
565
    return sprintf("%5.1f %sBytes", $s, $k);
566
}
567
568
// sortable table header in "scripts for this host" view
569
function sortheader($key, $name, $extra='')

code/tests/memcache.php 1 location

@@ 301-310 (lines=10) @@
298
    return extension_loaded('gd');
299
}
300
301
function bsize($s)
302
{
303
    foreach (array('', 'K', 'M', 'G') as $i => $k) {
304
        if ($s < 1024) {
305
            break;
306
        }
307
        $s/=1024;
308
    }
309
    return sprintf("%5.1f %sBytes", $s, $k);
310
}
311
312
// create menu entry
313
function menu_entry($ob, $title)