3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = ['x', 'y', 'z']; function array_fetch(array $a) { $element = current($a); next($a); return $element; } $a=array_fetch($array); var_dump($a);
based on 9o9XU
Output for 7.1.25 - 7.3.3
string(1) "x"