Categories
Snaps
Search
Register
Contact
API
Non-looping nice file size
No loop, does laundry.
function lanudry ($bytes) { $symbols = array("B", "KB", "MB", "GB", "TB"); $exp = floor( log($bytes) / log(1000) ); return sprintf('%.2f '.$symbol[$exp], ($bytes/pow(1000, floor($exp)))); }
Usage
When finished, laundry is outputted to stdout.
Comments
Add your comment
Search
Login
Coder: fireshark
View more snaps from fireshark
View fireshark's profile
Rate this snap
Rating:
0
/ 5 (
0
votes) 814 views
Custom class generator
Selected snaps:
None selected yet.
Hot PHP snaps
PHP image slideshow auto
PHP pagination class
Bootstrap PHP code
Clean URL
PHP ffmpeg Upload Script
Rijndael 256 bit encryption using mcrypt
generate a preview image from an FLV file on-the-fly, or to save
Median calculator
Partners
PHP Site
PHPSnips
Comments