Formats the number due to the specified settings.
It is a wrapper over the system function number_format.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $number | by value | string |
The number to be formatted. |
|
| $decimals | by value | int | 0 |
The number of digits after the dot. |
| $dec_point | by value | string | "." |
The decimal separator. |
| $thousand_sep | by value | string | "," |
The thousand separator. |
If the number is a vialid number, its formatted value is returned. Otherwise, the empty value is returned. It is usefil if we need to distiguish the empty value and 0.