aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/MathExecutor.php
diff options
context:
space:
mode:
authorFatih Kızmaz <barka_21@hotmail.com>2022-05-17 00:57:37 +0300
committerGitHub <noreply@github.com>2022-05-17 00:57:37 +0300
commit5d6b4a5dfdea6d4e2814391afcfcd9cf4259c046 (patch)
tree7b793b462a6d59748eb0a8faff18ad81ee4dae4e /src/NXP/MathExecutor.php
parent2874b1134189634853c3afaaf46c045f66d51ab9 (diff)
Full support for arrays => min, max and avg funcs accept array argument. Also array function is defined which return arguments as array. Square bracket arrays are also supported. (#108)
valid expression -> "max([1,2,3])" valid expression -> "max(array(1,2,3))" valid expression -> "max($ages_arr)" valid expression -> "max(ages_arr())"
Diffstat (limited to 'src/NXP/MathExecutor.php')
-rw-r--r--src/NXP/MathExecutor.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php
index e7e8259..dd90e22 100644
--- a/src/NXP/MathExecutor.php
+++ b/src/NXP/MathExecutor.php
@@ -469,7 +469,8 @@ class MathExecutor
'tan' => static fn($arg) => \tan($arg),
'tanh' => static fn($arg) => \tanh($arg),
'tn' => static fn($arg) => \tan($arg),
- 'tg' => static fn($arg) => \tan($arg)
+ 'tg' => static fn($arg) => \tan($arg),
+ 'array' => static fn(...$args) => [...$args]
];
}