count()
function count(array $value, int $mode = 0): int
Counts all elements in an array or Countable object.
Parameters:
$value(array)$mode(int), default0, optional
Returns: int
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/count.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how count is implemented in the compiler, see the internals page.