3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "las".return_bytes("8M"); function return_bytes($val){ $val = trim($val); $lat =str_split($val); $string=strpbrk($val, 'M'); $strig=strpbrk($val, 'm'); $strg=strpbrk($val, 'K'); $stg=strpbrk($val, 'k'); $last=array($strig,$strg,$string,$stg) switch($last) { case 'k': case 'K': return (int) $lat[0] * 1024; break; case 'm': case 'M': return (int) $lat[0] * 1048576; break; default: return $val; } ?>
Output for 5.4.0 - 5.4.21
Parse error: syntax error, unexpected 'switch' (T_SWITCH) in /in/1Jmh5 on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_SWITCH in /in/1Jmh5 on line 13
Process exited with code 255.