3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach ($regions as $region => $x) for ($list[$region] = $i = $x; end($regions) * 2 - (++$i % $x ? $i : $i += $x) > 0; $list[$region] .= ",$i"); ?>
Output for 5.5.0 - 7.1.0
Notice: Undefined variable: regions in /in/fLFGa on line 1 Warning: Invalid argument supplied for foreach() in /in/fLFGa on line 1
Output for 5.2.3 - 5.4.45
Warning: Invalid argument supplied for foreach() in /in/fLFGa on line 1
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.2.2
<br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/fLFGa</b> on line <b>1</b><br />
Output for 4.3.11