3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("precision", 52); function formatBytes($bytes, $precision = 2) { $units = array('B', 'KB', 'MB', 'GB', 'TB'); $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return round($bytes, $precision) . ' ' . $units[$pow]; } echo formatBytes(1317474, 1);
Output for git.master, git.master_jit, rfc.property-hooks
1.300000000000000044408920985006261616945266723632812 MB

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:
30.6 ms | 401 KiB | 8 Q