3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array('apple1', 'orange1', 'banana1', 'potato1', 'cocos1', 'lime1'); next($arr); $key = key($arr); unset($arr[key($arr)]); var_dump($arr);
Output for 4.3.0 - 7.1.0
array(5) { [0]=> string(6) "apple1" [2]=> string(7) "banana1" [3]=> string(7) "potato1" [4]=> string(6) "cocos1" [5]=> string(5) "lime1" }