3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'post_max_size in bytes = '.return_byte("8M"); function return_bytes($val) { $val = trim($val); $last =rtrim($val,"8"); switch($last) { case 'k': case 'K': return (int) $val * 1024; break; case 'm': case 'M': return (int) $val * 1048576; break; default: return $val; } } echo 'post_max_size in bytes = ' .return_byte('8M'); ?>

preferences:
41.25 ms | 402 KiB | 5 Q