3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i = 1; $i < 27; $i++) { $size = pow(10,$i); echo readableBytes($size) . PHP_EOL; } function readableBytes($size, $type='pc') { //ignore the pc - it is for something else - disabled for debugging $size = (double)$size; static $units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); $step = 1024; $i = 0; while (($size / $step) > 0.9) { $size = $size / $step; $i++; } return round($size, 2).$units[$i]; }
Output for rfc.property-hooks, git.master, git.master_jit
10B 100B 0.98kB 9.77kB 97.66kB 0.95MB 9.54MB 95.37MB 0.93GB 9.31GB 93.13GB 0.91TB 9.09TB 90.95TB 909.49TB 8.88PB 88.82PB 888.18PB 8.67EB 86.74EB 867.36EB 8.47ZB 84.7ZB 847.03ZB 8.27YB 82.72YB

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
53.19 ms | 1491 KiB | 4 Q