public static function type_float($var)
	{
		if (is_array($var) or is_object($var))
		{
			throw new InvalidContentType('Array or object could not be converted to float.');
		}

		// deal with locale issues
		$locale_info = localeconv();
		$var = str_replace($locale_info["mon_thousands_sep"] , "", $var);
		$var = str_replace($locale_info["mon_decimal_point"] , ".", $var);

		return floatval($var);
	}
public static function type_float($var)
	{
		if (is_array($var) or is_object($var))
		{
			throw new InvalidContentType('Array or object could not be converted to float.');
		}

		// deal with locale issues
		$locale_info = localeconv();
		$var = str_replace($locale_info["mon_thousands_sep"] , "", $var);
		$var = str_replace($locale_info["mon_decimal_point"] , ".", $var);

		return floatval($var);
	}
public static function type_float ( $ var ) { if ( is_array ( $ var ) or is_object ( $ var ) ) { throw new InvalidContentType ( 'Array or object could not be converted to float.' ) ; } // deal with locale issues $ locale_info = localeconv ( ) ; $ var = str_replace ( $ locale_info [ "mon_thousands_sep" ] , "" , $ var ) ; $ var = str_replace ( $ locale_info [ "mon_decimal_point" ] , "." , $ var ) ; return floatval ( $ var ) ; }
Casts to float when necessary

@param   mixed  value to typecast

@throws  InvalidContentType

@return  float
Casts to float when necessary