public static function strtobytes($string)
	{
		$val = false;
		
		// if $string is given
		if ($string !== null) {
			// if $string is actually a string
			if (is_string($string)) {
				// get the string's last character
				$val  = trim($string);
				$last = strtolower($val[strlen($val) - 1]);
		
				switch ($last) {
		
					case 'g':
						$val *= 1024;
						// no break
		
					case 'm':
						$val *= 1024;
						// no break
		
					case 'k':
						$val *= 1024;
						break;
					
					default:
						throw new \InvalidArgumentException(
							__METHOD__." expects the first parameter to end in 'k', 'm', or 'g'"		
						);
				}
			} else {
				throw new \InvalidArgumentException(
					__METHOD__." expects the first parameter to be a string"
				);
			}
		} else {
			throw new \BadMethodCallException(
				__METHOD__." expects one parameter"
			);
		}

		return $val;
	}