private static function floatToString(float $float) : string
    {
        $currentLocale = \setlocale(LC_NUMERIC, '0');
        \setlocale(LC_NUMERIC, 'C');

        $result = (string) $float;

        \setlocale(LC_NUMERIC, $currentLocale);

        return $result;
    }
private static function floatToString(float $float) : string
    {
        $currentLocale = \setlocale(LC_NUMERIC, '0');
        \setlocale(LC_NUMERIC, 'C');

        $result = (string) $float;

        \setlocale(LC_NUMERIC, $currentLocale);

        return $result;
    }
private static function floatToString ( float $ float ) : string { $ currentLocale = \ setlocale ( LC_NUMERIC , '0' ) ; \ setlocale ( LC_NUMERIC , 'C' ) ; $ result = ( string ) $ float ; \ setlocale ( LC_NUMERIC , $ currentLocale ) ; return $ result ; }
Safely converts float to string, avoiding locale-dependent issues.

@see https://github.com/brick/math/pull/20

@param float $float

@return string
Safely converts float to string avoiding locale - dependent issues .