(PHP 4, PHP 5, PHP 7)
current — 锟斤拷锟斤拷锟斤拷锟斤拷锟叫的碉拷前锟斤拷元
每锟斤拷锟斤拷锟斤拷锟叫讹拷锟斤拷一锟斤拷锟节诧拷锟斤拷指锟斤拷指锟斤拷锟斤拷"锟斤拷前锟斤拷"锟斤拷元锟斤拷锟斤拷始指锟斤拷锟斤拷氲斤拷锟斤拷锟斤拷械牡锟揭伙拷锟斤拷锟皆拷锟�
array
锟斤拷锟斤拷锟斤拷椤�
current() 锟斤拷锟斤拷锟斤拷锟截碉拷前锟斤拷锟节诧拷指锟斤拷指锟斤拷锟斤拷锟斤拷榈ピ拷锟街碉拷锟斤拷锟斤拷锟斤拷贫锟街革拷搿o拷锟斤拷锟节诧拷指锟斤拷指锟津超筹拷锟剿碉拷元锟叫憋拷锟侥╋拷耍锟�current()
锟斤拷锟斤拷 FALSE
锟斤拷
锟剿猴拷锟斤拷锟斤拷锟杰凤拷锟截诧拷锟斤拷值
FALSE
锟斤拷锟斤拷也锟斤拷锟杰凤拷锟截碉拷同锟斤拷 FALSE
锟侥非诧拷锟斤拷值锟斤拷锟斤拷锟侥讹拷 锟斤拷锟斤拷锟斤拷锟斤拷锟铰斤拷锟皆伙拷取锟斤拷锟斤拷锟斤拷息锟斤拷应使锟斤拷
===
锟斤拷锟斤拷锟�锟斤拷锟斤拷锟皆此猴拷锟斤拷锟侥凤拷锟斤拷值锟斤拷
Example #1 使锟斤拷 current() 系锟叫猴拷锟斤拷锟斤拷锟斤拷锟斤拷
<?php
$transport = array('foot', 'bike', 'car', 'plane');
$mode = current($transport); // $mode = 'foot';
$mode = next($transport); // $mode = 'bike';
$mode = current($transport); // $mode = 'bike';
$mode = prev($transport); // $mode = 'foot';
$mode = end($transport); // $mode = 'plane';
$mode = current($transport); // $mode = 'plane';
$arr = array();
var_dump(current($arr)); // bool(false)
$arr = array(array());
var_dump(current($arr)); // array(0) { }
?>