1
2<?php
3$transport = array('foot', 'bike', 'car', 'plane');
4$mode = current($transport); // $mode = 'foot';
5$mode = next($transport); // $mode = 'bike';
6$mode = current($transport); // $mode = 'bike';
7$mode = prev($transport); // $mode = 'foot';
8$mode = end($transport); // $mode = 'plane';
9$mode = current($transport); // $mode = 'plane';
10
11$arr = array();
12var_dump(current($arr)); // bool(false)
13
14$arr = array(array());
15var_dump(current($arr)); // array(0) { }
16?>
17
18