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)); $i++) array_walk(@array_filter($regions, function ($x) use ($i) { return $x & $i; }), function ($x, $region) use (&$list) { isset($list[$region]) and $list[$region] .= ","; $list[$region] .= $x; } ); var_dump($list);
Output for 7.0.0 - 7.1.0
Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Undefined index: int in /in/TegUe on line 14 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Undefined index: nl in /in/TegUe on line 14 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Undefined index: be in /in/TegUe on line 14 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Undefined index: us in /in/TegUe on line 14 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Undefined index: as in /in/TegUe on line 14 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Undefined index: za in /in/TegUe on line 14 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 Notice: Only variables should be passed by reference in /in/TegUe on line 13 array(6) { ["int"]=> string(63) "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" ["nl"]=> string(63) "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" ["be"]=> string(63) "4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4" ["us"]=> string(63) "8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8" ["as"]=> string(95) "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16" ["za"]=> string(95) "32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32" }
Output for hhvm-3.10.0 - 3.12.0
Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 Strict Warning: Only variables should be passed by reference in /in/TegUe on line 15 array(6) { ["int"]=> string(63) "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" ["nl"]=> string(63) "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" ["be"]=> string(63) "4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4" ["us"]=> string(63) "8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8" ["as"]=> string(95) "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16" ["za"]=> string(95) "32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32" }
Output for 5.5.0 - 5.6.28
Notice: Undefined index: int in /in/TegUe on line 14 Notice: Undefined index: nl in /in/TegUe on line 14 Notice: Undefined index: be in /in/TegUe on line 14 Notice: Undefined index: us in /in/TegUe on line 14 Notice: Undefined index: as in /in/TegUe on line 14 Notice: Undefined index: za in /in/TegUe on line 14 array(6) { ["int"]=> string(63) "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" ["nl"]=> string(63) "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" ["be"]=> string(63) "4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4" ["us"]=> string(63) "8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8" ["as"]=> string(95) "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16" ["za"]=> string(95) "32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32" }
Output for 5.4.0 - 5.4.45
array(6) { ["int"]=> string(63) "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" ["nl"]=> string(63) "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" ["be"]=> string(63) "4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4" ["us"]=> string(63) "8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8" ["as"]=> string(95) "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16" ["za"]=> string(95) "32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32" }
Output for 5.2.3 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/TegUe on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected '[' in <b>/in/TegUe</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
<br /> <b>Parse error</b>: parse error, unexpected '[' in <b>/in/TegUe</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/TegUe</b> on line <b>3</b><br />
Process exited with code 255.