original_string: public static function convertBytes($value)
      {
          if (is_numeric($value)) {
              return $value;
          }
  
          $value_length = \strlen($value);
          $qty = (int)substr($value, 0, $value_length - 1);
          $unit = Str::strtolower(substr($value, $value_length - 1));
          switch ($unit) {
              case 'k':
                  $qty *= 1024;
                  break;
              case 'm':
                  $qty *= 1048576;
                  break;
              case 'g':
                  $qty *= 1073741824;
                  break;
          }
  
          return $qty;
      }
code: public static function convertBytes($value)
      {
          if (is_numeric($value)) {
              return $value;
          }
  
          $value_length = \strlen($value);
          $qty = (int)substr($value, 0, $value_length - 1);
          $unit = Str::strtolower(substr($value, $value_length - 1));
          switch ($unit) {
              case 'k':
                  $qty *= 1024;
                  break;
              case 'm':
                  $qty *= 1048576;
                  break;
              case 'g':
                  $qty *= 1073741824;
                  break;
          }
  
          return $qty;
      }
code_tokens: public static function convertBytes ( $ value ) { if ( is_numeric ( $ value ) ) { return $ value ; } $ value_length = \ strlen ( $ value ) ; $ qty = ( int ) substr ( $ value , 0 , $ value_length - 1 ) ; $ unit = Str :: strtolower ( substr ( $ value , $ value_length - 1 ) ) ; switch ( $ unit ) { case 'k' : $ qty *= 1024 ; break ; case 'm' : $ qty *= 1048576 ; break ; case 'g' : $ qty *= 1073741824 ; break ; } return $ qty ; }
docstring: Convert a shorthand byte value from a PHP configuration directive to an integer value
  @param string $value value to convert
  @return int
docstring_tokens: Convert a shorthand byte value from a PHP configuration directive to an integer value