"; print ""; print '
Class Test Master
'; // class $byte = 254779258; $string = '242.98 MB'; print "BYTE TO: $byte: ".$_byte->humanReadableByteFormat($byte)."
"; print "BYTE FROM: $string: ".$_byte->stringByteFormat($string)."
"; // static print "S::BYTE TO: $byte: ".$byte_class::humanReadableByteFormat($byte)."
"; print "S::BYTE FROM: $string: ".$byte_class::stringByteFormat($string)."
"; // *** BYTES TEST *** $bytes = array( -123123123, 999999, // KB-1 999999999, // MB-1 254779258, // MB-n 999999999999999, // TB-1 588795544887632, // TB-n 999999999999999999, // PB-1 9223372036854775807, // MAX INT 999999999999999999999, // EB-1 ); print "BYTE FORMAT TESTS
"; foreach ($bytes as $byte) { print '
'; // print '
'; print "(".number_format($byte)."/".$byte.") bytes :"; $_bytes = Byte::humanReadableByteFormat($byte); print '
'.$_bytes; print '
'; print Byte::stringByteFormat($_bytes); print "
"; // print "
"; // print '
'; // print '
'; print "bytes [si]:"; $_bytes = Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_SI); print '
'.$_bytes; print '
'; print Byte::stringByteFormat($_bytes); print "
"; // print "
"; } // DEPRECATED /* $byte = 254779258; $string = '242.98 MB'; print "BYTE TO: $byte: ".$basic->humanReadableByteFormat($byte)."
"; print "BYTE FROM: $string: ".$basic->stringByteFormat($string)."
"; */ // error message print $basic->printErrorMsg(); print ""; // __END__