The ZPE empty
feature is used to determine if
a string, list, map or object has no characters, elements, keys or properties, respectively.
The empty
expression was added in ZPE 1.11.9.
Much like the count expression, whilst it looks like a built-in function, it is actually not and the underlying implementation is very different. By having the a different implementation, it actually runs faster too.
Using empty
To use it, write it like a function:
YASS
$a = empty("Hello world") print($a) $b = empty([]) print($b) $c = empty([=>]) print($c) $d = empty({}) print($d)
Comments