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

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

java - where to store the user credentials in an enterprise application(EAI)? -

java - netbeans "Please wait - classpath scanning in progress..." -