3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ["m" => 0,"b" => 1, "k" => 2,"a" => 3]; echo current($arr); // what is current position next($arr); // move current position echo current($arr); // mwhat is current position $key = array_keys($arr)[0]; echo current($arr); // make sure the position has not changed echo $key;

preferences:
30.09 ms | 407 KiB | 5 Q