3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $regions = [ 'int' => 1, 'nl' => 2, 'be' => 4, 'us' => 8, 'as' => 16, 'za' => 32, ]; for ($i = 0; ++$i < 1 << count($regions); array_walk($regions, function ($x, $region) use (&$list, $i) { var_dump($x, $i); $i & $x || return; if (isset($list[$region])) $list[$region] .= ",$i"; else $list[$region] = $i; })); var_dump($list);
Output for 5.4.0 - 5.5.6
Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/AaijP on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[' in /in/AaijP on line 3
Process exited with code 255.