3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = ['test1' => 'value1', 'test2' => 'value2']; foreach ($arr as $item) { echo key($arr) . "\n"; }
Output for 7.0.0 - 7.2.0
test1 test1
Output for 5.5.0 - 5.6.28
test2 test2