3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $source = ['a' => 'AA', 'b' => 'BB', 'c' => 'CC']; $info = list($key, $value) = reset($source); var_dump($info); for ($index = 0; $index < 10; $index++) { $info = next($source); if ($info === false) break; var_dump($info); }
based on AqTso
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0alpha1
string(2) "AA" string(2) "BB" string(2) "CC"