Moves the internal iterator position to the next element and returns this element.

/**
 * Moves the internal iterator position to the next element and returns this element.
 */
public function next()

Examples

$arrays = Arrays::create([0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red'])->next()

print_r($arrays);

The above example will output:

red

Getting Started

Methods