protected function memoryInBytes($value)
{
$unit = strtolower(substr($value, -1, 1));
$value = (int) $value;
switch ($unit) {
case 'g':
$value *= 1024;
// no break (cumulative multiplier)
// no break (cumulative multiplier)
case 'm':
$value *= 1024;
// no break (cumulative multiplier)
// no break (cumulative multiplier)
case 'k':
$value *= 1024;
}
return $value;
}