PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function bitConverter(int $size): string { $units = ['b', 'Kb', 'Mb', 'Gb']; $unit = reset($units); while ($size > 1000) { $size = (int)($size / 1000); $unit = next($units); } return $size . $unit; } echo bitConverter(74288386);
Show:  
Copy Clear