english/libraries/joomla/utilities/utility.php
/**
	 * Return the byte value of a particular string
	 *
	 * @param   string  $val  String optionally with G, M or K suffix
	 *
	 * @return  integer  size in bytes
	 * @since   11.1
	 *
	 * @deprecated
	 * @see       JHtmlNumber::bytes
	 */
Return the byte value of a particular string
@param   string  $val  String optionally with G, M or K suffix

@return  integer  size in bytes
@since   11.1


Return the byte value of a particular string @param string $val String optionally with G M or K suffix @return integer size in bytes @since 11 . 1
function return_bytes($val)
	{
		$val = trim($val);
		$last = strtolower($val{strlen($val)-1});
		switch($last)
		{
			case 'g':
				$val *= 1024;
			case 'm':
				$val *= 1024;
			case 'k':
				$val *= 1024;
		}
		return $val;
	}
function return_bytes ( $ val ) { $ val = trim ( $ val ) ; $ last = strtolower ( $ val { strlen ( $ val ) - 1 } ) ; switch ( $ last ) { case 'g' : $ val *= 1024 ; case 'm' : $ val *= 1024 ; case 'k' : $ val *= 1024 ; } return $ val ; }
Return the byte value of a particular string
 @param   string  $val  String optionally with G, M or K suffix
Return the byte value of a particular string @param string $val String optionally with G M or K suffix
// The 'G' modifier is available since PHP 5.1.0