src/mako/i18n/I18n.php
public function number(float $number, int $decimals = 0, ?string $decimalPoint = null, ?string $thousandsSeparator = null): string
	{
		static $defaults;

		if(empty($defaults))
		{
			$localeconv = localeconv();

			$defaults =
			[
				'decimal'   => $localeconv['decimal_point'] ?: '.',
				'thousands' => $localeconv['thousands_sep'] ?: ',',
			];
		}

		return number_format($number, $decimals, ($decimalPoint ?: $defaults['decimal']), ($thousandsSeparator ?: $defaults['thousands']));
	}
public function number(float $number, int $decimals = 0, ?string $decimalPoint = null, ?string $thousandsSeparator = null): string
	{
		static $defaults;

		if(empty($defaults))
		{
			$localeconv = localeconv();

			$defaults =
			[
				'decimal'   => $localeconv['decimal_point'] ?: '.',
				'thousands' => $localeconv['thousands_sep'] ?: ',',
			];
		}

		return number_format($number, $decimals, ($decimalPoint ?: $defaults['decimal']), ($thousandsSeparator ?: $defaults['thousands']));
	}
public function number ( float $ number , int $ decimals = 0 , ? string $ decimalPoint = null , ? string $ thousandsSeparator = null ) : string { static $ defaults ; if ( empty ( $ defaults ) ) { $ localeconv = localeconv ( ) ; $ defaults = [ 'decimal' => $ localeconv [ 'decimal_point' ] ? : '.' , 'thousands' => $ localeconv [ 'thousands_sep' ] ? : ',' , ] ; } return number_format ( $ number , $ decimals , ( $ decimalPoint ? : $ defaults [ 'decimal' ] ) , ( $ thousandsSeparator ? : $ defaults [ 'thousands' ] ) ) ; }
Format number according to locale or desired format.

@param  float       $number             Number to format
@param  int         $decimals           Number of decimals
@param  string|null $decimalPoint       Decimal point
@param  string|null $thousandsSeparator Thousands separator
@return string
Format number according to locale or desired format .