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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

binding - How can you make the color of elements of a WPF DrawingImage dynamic? -

c# - How to add a new treeview at the selected node? -