oop - Anyone knows a good implementation of file size as a value object in PHP? -
in project came across lot of references disk or file sizes(in bytes, kilo, mega etc) though candidate value object money or quantity. wonder if has ever done before in php. thanks.
you can use zend_measure_binary...
$measure = new zend_measure_binary($size, zend_measure_binary::byte); $size = $measure->convertto(zend_measure_binary::megabyte);
Comments
Post a Comment