| Name | Description |
|---|---|
| decimal | Format a decimal number for USA currency. |
| format | Format a value based on the specified format type. |
Description
public static decimal (string|float|int $str, int $length, int $after)Format a decimal number for USA currency.
Parameters
(string|float|int) $str: The number to format.*(int) $length: The maximum length of the formatted number.*(int) $after: Number of digits after the decimal point. Return Values
string|array
The formatted number or an error message.
Description
public static format (string $what, string $val)Format a value based on the specified format type.
Parameters
(string) $what: The format type (e.g., 'datetime', 'mysql-phone', 'display-time', 'phone').*(string) $val: The value to format. Return Values
string
The formatted value.