Summary
- File
- Package hierarchy Helper
- Class hierarchy \NumberHelper
Number helper
Number helper
numeric(string $var, string $type = 'int') : mixed
Converts a string to a numeric value.
| string | $var | The value you want to convert. |
| string | $type | 'int' if you want to convert to an integer value, 'float' if you want a floating value. |
The integer or floating value (according to the type you chose).
| None found |
round(mixed $number, integer $dec) : string
Rounds a number
| mixed | $number | Number to round |
| integer | $dec | The number of decilam points |
The rounded number.
| None found |