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); //echo $a; var_dump($a); return $element; } $a=array_fetch($array);
based on tLUam
Output for 7.1.25 - 7.3.3
array(3) { [0]=> string(1) "x" [1]=> string(1) "y" [2]=> string(1) "z" }