-
Notifications
You must be signed in to change notification settings - Fork 0
diff
Corey Avis edited this page Sep 23, 2026
·
2 revisions
Accepts a list or array of real numbers and subtracts all subsequent values from the first element to return a result.
diff(array|integer|float ...$args): float
args (array|integer|float) : A list or array of real numbers.
(float)
: Returns the difference of all real numbers.
: Returns 0 if the input is empty.
$fx->diff(5, 7, 3) = -5
$fx->diff([4, 8, 2]) = -6
$fx->diff(1.2, 5.6, 3.4) = -7.8
| Config Key | Default Value | Allowed Values | Description |
|---|---|---|---|
| dp | 2 | integers | Decimal points |
- No debug errors.
Home | CoreyFX | Mathematical