← All docs

reset()

Rewinds the array's internal pointer to the first element and returns it.

reset()

function reset(array $array): mixed

Rewinds the array’s internal pointer to the first element and returns it.

Parameters:

  • $array (array), passed by reference

Returns: mixed

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how reset is implemented in the compiler, see the internals page.