(PHP 5 >= 5.3.0, PHP 7)
SplFixedArray::next — Move to next entry
This function has no parameters.
No value is returned.
<?php
/**
* Example : rewind();
*/$arr= new SplFixedArray(5);$a= $arr->key(); //Cero'th indexvar_dump($a);
echo"<br>";
$arr->next(); // Shift to first index$a= $arr->key();
var_dump($a);
echo"<br>";
$arr->next(); // Shift to second index$a= $arr->key();
var_dump($a);
echo"<br>";
$arr->next(); // Shift to third index$a= $arr->key();
var_dump($a);
echo"<br>";
?>
The above example will output:
int(0)
int(1)
int(2)
int(3)