Skip to content

CountableIteratorIteratorTrait

github-actions edited this page Mar 31, 2026 · 2 revisions

  • Full name: \FastForward\Iterator\CountableIteratorIteratorTrait

Methods

count

Counts the number of elements in the iterable.

public count(): int

If the inner iterator implements Countable, it uses that. Otherwise, it counts the elements by iterating through them.

Return Value:

the number of elements in the iterable


Clone this wiki locally