3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cur; $arr = array('apple', 'orange', 'banana', 'potato', 'cocos', 'lime'); var_dump(current($arr)); next($arr); next($arr); next($arr); next($arr); next($arr); $arr = array('apple1', 'orange1', 'banana1', 'potato1', 'cocos1', 'lime1'); unset(current($arr)); var_dump($arr);
Output for 5.3.0 - 5.4.24
Fatal error: Can't use function return value in write context in /in/N898X on line 13
Process exited with code 255.