3v4l.org

run code in 300+ PHP versions simultaneously
<?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) { var_dump($x, $i); return $i & $x; }), function ($x, $region) use (&$list) { if (isset($list[$region])) $list[$region] .= ",$x"; else $list[$region] = $x; } ); var_dump($list);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
int(1) int(0) int(2) int(0) int(4) int(0) int(8) int(0) int(16) int(0) int(32) int(0) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(1) int(2) int(1) int(4) int(1) int(8) int(1) int(16) int(1) int(32) int(1) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(2) int(2) int(2) int(4) int(2) int(8) int(2) int(16) int(2) int(32) int(2) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(3) int(2) int(3) int(4) int(3) int(8) int(3) int(16) int(3) int(32) int(3) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(4) int(2) int(4) int(4) int(4) int(8) int(4) int(16) int(4) int(32) int(4) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(5) int(2) int(5) int(4) int(5) int(8) int(5) int(16) int(5) int(32) int(5) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(6) int(2) int(6) int(4) int(6) int(8) int(6) int(16) int(6) int(32) int(6) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(7) int(2) int(7) int(4) int(7) int(8) int(7) int(16) int(7) int(32) int(7) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(8) int(2) int(8) int(4) int(8) int(8) int(8) int(16) int(8) int(32) int(8) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(9) int(2) int(9) int(4) int(9) int(8) int(9) int(16) int(9) int(32) int(9) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(10) int(2) int(10) int(4) int(10) int(8) int(10) int(16) int(10) int(32) int(10) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(11) int(2) int(11) int(4) int(11) int(8) int(11) int(16) int(11) int(32) int(11) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(12) int(2) int(12) int(4) int(12) int(8) int(12) int(16) int(12) int(32) int(12) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(13) int(2) int(13) int(4) int(13) int(8) int(13) int(16) int(13) int(32) int(13) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(14) int(2) int(14) int(4) int(14) int(8) int(14) int(16) int(14) int(32) int(14) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(15) int(2) int(15) int(4) int(15) int(8) int(15) int(16) int(15) int(32) int(15) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(16) int(2) int(16) int(4) int(16) int(8) int(16) int(16) int(16) int(32) int(16) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(17) int(2) int(17) int(4) int(17) int(8) int(17) int(16) int(17) int(32) int(17) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(18) int(2) int(18) int(4) int(18) int(8) int(18) int(16) int(18) int(32) int(18) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(19) int(2) int(19) int(4) int(19) int(8) int(19) int(16) int(19) int(32) int(19) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(20) int(2) int(20) int(4) int(20) int(8) int(20) int(16) int(20) int(32) int(20) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(21) int(2) int(21) int(4) int(21) int(8) int(21) int(16) int(21) int(32) int(21) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(22) int(2) int(22) int(4) int(22) int(8) int(22) int(16) int(22) int(32) int(22) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(23) int(2) int(23) int(4) int(23) int(8) int(23) int(16) int(23) int(32) int(23) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(24) int(2) int(24) int(4) int(24) int(8) int(24) int(16) int(24) int(32) int(24) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(25) int(2) int(25) int(4) int(25) int(8) int(25) int(16) int(25) int(32) int(25) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(26) int(2) int(26) int(4) int(26) int(8) int(26) int(16) int(26) int(32) int(26) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(27) int(2) int(27) int(4) int(27) int(8) int(27) int(16) int(27) int(32) int(27) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(28) int(2) int(28) int(4) int(28) int(8) int(28) int(16) int(28) int(32) int(28) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(29) int(2) int(29) int(4) int(29) int(8) int(29) int(16) int(29) int(32) int(29) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(30) int(2) int(30) int(4) int(30) int(8) int(30) int(16) int(30) int(32) int(30) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(31) int(2) int(31) int(4) int(31) int(8) int(31) int(16) int(31) int(32) int(31) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(32) int(2) int(32) int(4) int(32) int(8) int(32) int(16) int(32) int(32) int(32) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(33) int(2) int(33) int(4) int(33) int(8) int(33) int(16) int(33) int(32) int(33) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(34) int(2) int(34) int(4) int(34) int(8) int(34) int(16) int(34) int(32) int(34) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(35) int(2) int(35) int(4) int(35) int(8) int(35) int(16) int(35) int(32) int(35) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(36) int(2) int(36) int(4) int(36) int(8) int(36) int(16) int(36) int(32) int(36) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(37) int(2) int(37) int(4) int(37) int(8) int(37) int(16) int(37) int(32) int(37) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(38) int(2) int(38) int(4) int(38) int(8) int(38) int(16) int(38) int(32) int(38) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(39) int(2) int(39) int(4) int(39) int(8) int(39) int(16) int(39) int(32) int(39) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(40) int(2) int(40) int(4) int(40) int(8) int(40) int(16) int(40) int(32) int(40) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(41) int(2) int(41) int(4) int(41) int(8) int(41) int(16) int(41) int(32) int(41) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(42) int(2) int(42) int(4) int(42) int(8) int(42) int(16) int(42) int(32) int(42) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(43) int(2) int(43) int(4) int(43) int(8) int(43) int(16) int(43) int(32) int(43) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(44) int(2) int(44) int(4) int(44) int(8) int(44) int(16) int(44) int(32) int(44) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(45) int(2) int(45) int(4) int(45) int(8) int(45) int(16) int(45) int(32) int(45) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(46) int(2) int(46) int(4) int(46) int(8) int(46) int(16) int(46) int(32) int(46) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(47) int(2) int(47) int(4) int(47) int(8) int(47) int(16) int(47) int(32) int(47) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(48) int(2) int(48) int(4) int(48) int(8) int(48) int(16) int(48) int(32) int(48) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(49) int(2) int(49) int(4) int(49) int(8) int(49) int(16) int(49) int(32) int(49) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(50) int(2) int(50) int(4) int(50) int(8) int(50) int(16) int(50) int(32) int(50) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(51) int(2) int(51) int(4) int(51) int(8) int(51) int(16) int(51) int(32) int(51) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(52) int(2) int(52) int(4) int(52) int(8) int(52) int(16) int(52) int(32) int(52) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(53) int(2) int(53) int(4) int(53) int(8) int(53) int(16) int(53) int(32) int(53) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(54) int(2) int(54) int(4) int(54) int(8) int(54) int(16) int(54) int(32) int(54) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(55) int(2) int(55) int(4) int(55) int(8) int(55) int(16) int(55) int(32) int(55) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(56) int(2) int(56) int(4) int(56) int(8) int(56) int(16) int(56) int(32) int(56) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(57) int(2) int(57) int(4) int(57) int(8) int(57) int(16) int(57) int(32) int(57) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(58) int(2) int(58) int(4) int(58) int(8) int(58) int(16) int(58) int(32) int(58) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(59) int(2) int(59) int(4) int(59) int(8) int(59) int(16) int(59) int(32) int(59) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(60) int(2) int(60) int(4) int(60) int(8) int(60) int(16) int(60) int(32) int(60) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(61) int(2) int(61) int(4) int(61) int(8) int(61) int(16) int(61) int(32) int(61) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(62) int(2) int(62) int(4) int(62) int(8) int(62) int(16) int(62) int(32) int(62) Notice: Only variables should be passed by reference in /in/XeEBd on line 13 int(1) int(63) int(2) int(63) int(4) int(63) int(8) int(63) int(16) int(63) int(32) int(63) Notice: Only variables should be passed by reference in /in/XeEBd 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 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.3.32 - 7.3.33, 7.4.26
int(1) int(0) int(2) int(0) int(4) int(0) int(8) int(0) int(16) int(0) int(32) int(0) int(1) int(1) int(2) int(1) int(4) int(1) int(8) int(1) int(16) int(1) int(32) int(1) int(1) int(2) int(2) int(2) int(4) int(2) int(8) int(2) int(16) int(2) int(32) int(2) int(1) int(3) int(2) int(3) int(4) int(3) int(8) int(3) int(16) int(3) int(32) int(3) int(1) int(4) int(2) int(4) int(4) int(4) int(8) int(4) int(16) int(4) int(32) int(4) int(1) int(5) int(2) int(5) int(4) int(5) int(8) int(5) int(16) int(5) int(32) int(5) int(1) int(6) int(2) int(6) int(4) int(6) int(8) int(6) int(16) int(6) int(32) int(6) int(1) int(7) int(2) int(7) int(4) int(7) int(8) int(7) int(16) int(7) int(32) int(7) int(1) int(8) int(2) int(8) int(4) int(8) int(8) int(8) int(16) int(8) int(32) int(8) int(1) int(9) int(2) int(9) int(4) int(9) int(8) int(9) int(16) int(9) int(32) int(9) int(1) int(10) int(2) int(10) int(4) int(10) int(8) int(10) int(16) int(10) int(32) int(10) int(1) int(11) int(2) int(11) int(4) int(11) int(8) int(11) int(16) int(11) int(32) int(11) int(1) int(12) int(2) int(12) int(4) int(12) int(8) int(12) int(16) int(12) int(32) int(12) int(1) int(13) int(2) int(13) int(4) int(13) int(8) int(13) int(16) int(13) int(32) int(13) int(1) int(14) int(2) int(14) int(4) int(14) int(8) int(14) int(16) int(14) int(32) int(14) int(1) int(15) int(2) int(15) int(4) int(15) int(8) int(15) int(16) int(15) int(32) int(15) int(1) int(16) int(2) int(16) int(4) int(16) int(8) int(16) int(16) int(16) int(32) int(16) int(1) int(17) int(2) int(17) int(4) int(17) int(8) int(17) int(16) int(17) int(32) int(17) int(1) int(18) int(2) int(18) int(4) int(18) int(8) int(18) int(16) int(18) int(32) int(18) int(1) int(19) int(2) int(19) int(4) int(19) int(8) int(19) int(16) int(19) int(32) int(19) int(1) int(20) int(2) int(20) int(4) int(20) int(8) int(20) int(16) int(20) int(32) int(20) int(1) int(21) int(2) int(21) int(4) int(21) int(8) int(21) int(16) int(21) int(32) int(21) int(1) int(22) int(2) int(22) int(4) int(22) int(8) int(22) int(16) int(22) int(32) int(22) int(1) int(23) int(2) int(23) int(4) int(23) int(8) int(23) int(16) int(23) int(32) int(23) int(1) int(24) int(2) int(24) int(4) int(24) int(8) int(24) int(16) int(24) int(32) int(24) int(1) int(25) int(2) int(25) int(4) int(25) int(8) int(25) int(16) int(25) int(32) int(25) int(1) int(26) int(2) int(26) int(4) int(26) int(8) int(26) int(16) int(26) int(32) int(26) int(1) int(27) int(2) int(27) int(4) int(27) int(8) int(27) int(16) int(27) int(32) int(27) int(1) int(28) int(2) int(28) int(4) int(28) int(8) int(28) int(16) int(28) int(32) int(28) int(1) int(29) int(2) int(29) int(4) int(29) int(8) int(29) int(16) int(29) int(32) int(29) int(1) int(30) int(2) int(30) int(4) int(30) int(8) int(30) int(16) int(30) int(32) int(30) int(1) int(31) int(2) int(31) int(4) int(31) int(8) int(31) int(16) int(31) int(32) int(31) int(1) int(32) int(2) int(32) int(4) int(32) int(8) int(32) int(16) int(32) int(32) int(32) int(1) int(33) int(2) int(33) int(4) int(33) int(8) int(33) int(16) int(33) int(32) int(33) int(1) int(34) int(2) int(34) int(4) int(34) int(8) int(34) int(16) int(34) int(32) int(34) int(1) int(35) int(2) int(35) int(4) int(35) int(8) int(35) int(16) int(35) int(32) int(35) int(1) int(36) int(2) int(36) int(4) int(36) int(8) int(36) int(16) int(36) int(32) int(36) int(1) int(37) int(2) int(37) int(4) int(37) int(8) int(37) int(16) int(37) int(32) int(37) int(1) int(38) int(2) int(38) int(4) int(38) int(8) int(38) int(16) int(38) int(32) int(38) int(1) int(39) int(2) int(39) int(4) int(39) int(8) int(39) int(16) int(39) int(32) int(39) int(1) int(40) int(2) int(40) int(4) int(40) int(8) int(40) int(16) int(40) int(32) int(40) int(1) int(41) int(2) int(41) int(4) int(41) int(8) int(41) int(16) int(41) int(32) int(41) int(1) int(42) int(2) int(42) int(4) int(42) int(8) int(42) int(16) int(42) int(32) int(42) int(1) int(43) int(2) int(43) int(4) int(43) int(8) int(43) int(16) int(43) int(32) int(43) int(1) int(44) int(2) int(44) int(4) int(44) int(8) int(44) int(16) int(44) int(32) int(44) int(1) int(45) int(2) int(45) int(4) int(45) int(8) int(45) int(16) int(45) int(32) int(45) int(1) int(46) int(2) int(46) int(4) int(46) int(8) int(46) int(16) int(46) int(32) int(46) int(1) int(47) int(2) int(47) int(4) int(47) int(8) int(47) int(16) int(47) int(32) int(47) int(1) int(48) int(2) int(48) int(4) int(48) int(8) int(48) int(16) int(48) int(32) int(48) int(1) int(49) int(2) int(49) int(4) int(49) int(8) int(49) int(16) int(49) int(32) int(49) int(1) int(50) int(2) int(50) int(4) int(50) int(8) int(50) int(16) int(50) int(32) int(50) int(1) int(51) int(2) int(51) int(4) int(51) int(8) int(51) int(16) int(51) int(32) int(51) int(1) int(52) int(2) int(52) int(4) int(52) int(8) int(52) int(16) int(52) int(32) int(52) int(1) int(53) int(2) int(53) int(4) int(53) int(8) int(53) int(16) int(53) int(32) int(53) int(1) int(54) int(2) int(54) int(4) int(54) int(8) int(54) int(16) int(54) int(32) int(54) int(1) int(55) int(2) int(55) int(4) int(55) int(8) int(55) int(16) int(55) int(32) int(55) int(1) int(56) int(2) int(56) int(4) int(56) int(8) int(56) int(16) int(56) int(32) int(56) int(1) int(57) int(2) int(57) int(4) int(57) int(8) int(57) int(16) int(57) int(32) int(57) int(1) int(58) int(2) int(58) int(4) int(58) int(8) int(58) int(16) int(58) int(32) int(58) int(1) int(59) int(2) int(59) int(4) int(59) int(8) int(59) int(16) int(59) int(32) int(59) int(1) int(60) int(2) int(60) int(4) int(60) int(8) int(60) int(16) int(60) int(32) int(60) int(1) int(61) int(2) int(61) int(4) int(61) int(8) int(61) int(16) int(61) int(32) int(61) int(1) int(62) int(2) int(62) int(4) int(62) int(8) int(62) int(16) int(62) int(32) int(62) int(1) int(63) int(2) int(63) int(4) int(63) int(8) int(63) int(16) int(63) int(32) int(63) 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 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/XeEBd on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/XeEBd on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/XeEBd on line 3
Process exited with code 255.

preferences:
323.12 ms | 401 KiB | 316 Q