- floor: documentation ( source)
- log: documentation ( source)
- pow: documentation ( source)
- number_format: documentation ( source)
<?php
$measures = array('byte', 'kilob', 'megab', 'gigab', 'terab');
$index = floor(log(2147483647, 1024));
echo $index;
$size = number_format(2147483647 / pow(1024, $index),1);
#echo $size;
?>