@@ -149,27 +149,29 @@ params can be encapsulated into `|` characters if your expression contains `,`
149
149
150
150
## Built-in functions
151
151
152
- | ** function** | ** php equivalent** | ** notes** |
153
- | ------------------------------------------| -----------------------------------| ---------------------------------------|
154
- | ` logic.and, a, b ` | ` $a && $b ` | |
155
- | ` logic.or, a, b ` | ` $a \|\| $b ` | |
156
- | ` logic.not, a ` | ` !$a ` | |
157
- | ` compare.equal, a, b ` | ` $a == $b ` | |
158
- | ` compare.different, a, b ` | ` $a != $b ` | |
159
- | ` compare.exact, a, b ` | ` $a === $b ` | |
160
- | ` compare.notExact, a, b ` | ` $a !== $b ` | |
161
- | ` compare.larger, a, b ` | ` $a > $b ` | |
162
- | ` compare.largerEqual, a, b ` | ` $a >= $b ` | |
163
- | ` compare.smaller, a, b ` | ` $a < $b ` | |
164
- | ` compare.smallerEqual, a, b ` | ` $a <= $b ` | |
165
- | ` array.count, var ` | ` count($var) ` | var can be a countable array or object|
166
- | ` array.reverse, var ` | ` array_reverse($var) ` | |
167
- | ` text.length, string ` | ` strlen($string) ` | |
168
- | ` text.concat, string1, string2, ... ` | ` implode('', $strings) ` | |
169
- | ` text.implode, separator, array ` | ` implode($separator, $array) ` | |
170
- | ` text.explode, separator, string, limit ` | ` explode($separator, $string, $limit) ` | limit is optional |
171
- | ` json.decode, string ` | ` json_decode($string, true) ` | |
172
- | ` json.encode, var ` | ` json_encode($var) ` | |
152
+ | ** function** | ** php equivalent** | ** notes** |
153
+ | ------------------------------------------| ----------------------------------------| ----------------------------------------|
154
+ | ` logic.ternary, a, b, c ` | ` $a ? $b : $c ` | |
155
+ | ` logic.shortTernary, a, b ` | ` $a ?: $b ` | |
156
+ | ` logic.and, a, b ` | ` $a && $b ` | |
157
+ | ` logic.or, a, b ` | ` $a \|\| $b ` | |
158
+ | ` logic.not, a ` | ` !$a ` | |
159
+ | ` compare.equal, a, b ` | ` $a == $b ` | |
160
+ | ` compare.different, a, b ` | ` $a != $b ` | |
161
+ | ` compare.exact, a, b ` | ` $a === $b ` | |
162
+ | ` compare.notExact, a, b ` | ` $a !== $b ` | |
163
+ | ` compare.larger, a, b ` | ` $a > $b ` | |
164
+ | ` compare.largerEqual, a, b ` | ` $a >= $b ` | |
165
+ | ` compare.smaller, a, b ` | ` $a < $b ` | |
166
+ | ` compare.smallerEqual, a, b ` | ` $a <= $b ` | |
167
+ | ` array.count, var ` | ` count($var) ` | var can be a countable array or object |
168
+ | ` array.reverse, var ` | ` array_reverse($var) ` | |
169
+ | ` text.length, string ` | ` strlen($string) ` | |
170
+ | ` text.concat, string1, string2, ... ` | ` implode('', $strings) ` | |
171
+ | ` text.implode, separator, array ` | ` implode($separator, $array) ` | |
172
+ | ` text.explode, separator, string, limit ` | ` explode($separator, $string, $limit) ` | limit is optional |
173
+ | ` json.decode, string ` | ` json_decode($string, true) ` | |
174
+ | ` json.encode, var ` | ` json_encode($var) ` | |
173
175
174
176
175
177
## Class
0 commit comments