SwatI18N/SwatI18NLocale.php
public function parseFloat($string)
    {
        $value = null;

        $lc = $this->getLocaleInfo();

        $string = $this->parseNegativeNotation($string);

        $search = array(
            $lc['thousands_sep'],
            $lc['decimal_point'],
            $lc['positive_sign'],
            ' '
        );

        $replace = array('', '.', '', '');

        $string = str_replace($search, $replace, $string);

        if (is_numeric($string)) {
            $value = floatval($string);
        }

        return $value;
    }
public function parseFloat($string)
    {
        $value = null;

        $lc = $this->getLocaleInfo();

        $string = $this->parseNegativeNotation($string);

        $search = array(
            $lc['thousands_sep'],
            $lc['decimal_point'],
            $lc['positive_sign'],
            ' '
        );

        $replace = array('', '.', '', '');

        $string = str_replace($search, $replace, $string);

        if (is_numeric($string)) {
            $value = floatval($string);
        }

        return $value;
    }
public function parseFloat ( $ string ) { $ value = null ; $ lc = $ this -> getLocaleInfo ( ) ; $ string = $ this -> parseNegativeNotation ( $ string ) ; $ search = array ( $ lc [ 'thousands_sep' ] , $ lc [ 'decimal_point' ] , $ lc [ 'positive_sign' ] , ' ' ) ; $ replace = array ( '' , '.' , '' , '' ) ; $ string = str_replace ( $ search , $ replace , $ string ) ; if ( is_numeric ( $ string ) ) { $ value = floatval ( $ string ) ; } return $ value ; }
Parses a numeric string formatted for this locale into a floating-point
number

Note: The number does not have to be formatted exactly correctly to be
parsed. Checking too closely how well a formatted number matches its
locale would be annoying for users. For example, '1000' should not be
rejected because it wasn't formatted as '1,000'.

@param string $string the formatted string.

@return float the numeric value of the parsed string. If the given
value could not be parsed, null is returned.
Parses a numeric string formatted for this locale into a floating - point number