3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t = range(1, 32, 1); $g = []; while (!empty($t) && count($g) < 4) { $key = array_rand($t); $g[] = $t[$key]; unset($t[$key]); } var_dump($g);
Output for 7.1.0
array(4) { [0]=> int(1) [1]=> int(24) [2]=> int(20) [3]=> int(22) }
Output for 7.0.14
array(4) { [0]=> int(1) [1]=> int(19) [2]=> int(13) [3]=> int(26) }
Output for 7.0.8
array(4) { [0]=> int(17) [1]=> int(6) [2]=> int(21) [3]=> int(25) }
Output for 7.0.7
array(4) { [0]=> int(3) [1]=> int(22) [2]=> int(29) [3]=> int(18) }
Output for 7.0.6
array(4) { [0]=> int(2) [1]=> int(12) [2]=> int(4) [3]=> int(27) }
Output for 7.0.5
array(4) { [0]=> int(6) [1]=> int(30) [2]=> int(18) [3]=> int(13) }
Output for 7.0.4
array(4) { [0]=> int(6) [1]=> int(30) [2]=> int(9) [3]=> int(2) }
Output for 7.0.3
array(4) { [0]=> int(24) [1]=> int(28) [2]=> int(3) [3]=> int(31) }
Output for 7.0.2
array(4) { [0]=> int(27) [1]=> int(10) [2]=> int(1) [3]=> int(13) }
Output for 7.0.1
array(4) { [0]=> int(30) [1]=> int(1) [2]=> int(3) [3]=> int(22) }
Output for 7.0.0
array(4) { [0]=> int(10) [1]=> int(21) [2]=> int(31) [3]=> int(22) }
Output for hhvm-3.12.0
array(4) { [0]=> int(8) [1]=> int(24) [2]=> int(11) [3]=> int(2) }
Output for hhvm-3.10.0
array(4) { [0]=> int(29) [1]=> int(19) [2]=> int(26) [3]=> int(13) }
Output for 5.6.28
array(4) { [0]=> int(22) [1]=> int(32) [2]=> int(8) [3]=> int(7) }
Output for 5.6.23
array(4) { [0]=> int(29) [1]=> int(25) [2]=> int(7) [3]=> int(1) }
Output for 5.6.22
array(4) { [0]=> int(27) [1]=> int(32) [2]=> int(28) [3]=> int(10) }
Output for 5.6.21
array(4) { [0]=> int(2) [1]=> int(30) [2]=> int(20) [3]=> int(26) }
Output for 5.6.20
array(4) { [0]=> int(19) [1]=> int(1) [2]=> int(29) [3]=> int(17) }
Output for 5.6.19
array(4) { [0]=> int(28) [1]=> int(2) [2]=> int(14) [3]=> int(23) }
Output for 5.6.18
array(4) { [0]=> int(1) [1]=> int(31) [2]=> int(6) [3]=> int(4) }
Output for 5.6.17
array(4) { [0]=> int(26) [1]=> int(27) [2]=> int(6) [3]=> int(25) }
Output for 5.6.16
array(4) { [0]=> int(24) [1]=> int(3) [2]=> int(9) [3]=> int(6) }
Output for 5.6.15
array(4) { [0]=> int(2) [1]=> int(13) [2]=> int(29) [3]=> int(26) }
Output for 5.6.14
array(4) { [0]=> int(29) [1]=> int(6) [2]=> int(24) [3]=> int(26) }
Output for 5.6.13
array(4) { [0]=> int(7) [1]=> int(5) [2]=> int(2) [3]=> int(21) }
Output for 5.6.12
array(4) { [0]=> int(16) [1]=> int(31) [2]=> int(15) [3]=> int(27) }
Output for 5.6.11
array(4) { [0]=> int(11) [1]=> int(7) [2]=> int(15) [3]=> int(26) }
Output for 5.6.10
array(4) { [0]=> int(26) [1]=> int(25) [2]=> int(18) [3]=> int(4) }
Output for 5.6.9
array(4) { [0]=> int(6) [1]=> int(19) [2]=> int(7) [3]=> int(21) }
Output for 5.6.8
array(4) { [0]=> int(9) [1]=> int(12) [2]=> int(11) [3]=> int(27) }
Output for 5.6.7
array(4) { [0]=> int(5) [1]=> int(29) [2]=> int(6) [3]=> int(13) }
Output for 5.6.6
array(4) { [0]=> int(30) [1]=> int(18) [2]=> int(28) [3]=> int(9) }
Output for 5.6.5
array(4) { [0]=> int(28) [1]=> int(1) [2]=> int(18) [3]=> int(2) }
Output for 5.6.4
array(4) { [0]=> int(15) [1]=> int(12) [2]=> int(2) [3]=> int(10) }
Output for 5.6.3
array(4) { [0]=> int(1) [1]=> int(15) [2]=> int(22) [3]=> int(31) }
Output for 5.6.2
array(4) { [0]=> int(27) [1]=> int(30) [2]=> int(10) [3]=> int(17) }
Output for 5.6.1
array(4) { [0]=> int(6) [1]=> int(8) [2]=> int(9) [3]=> int(5) }
Output for 5.6.0
array(4) { [0]=> int(20) [1]=> int(13) [2]=> int(23) [3]=> int(17) }
Output for 5.5.37
array(4) { [0]=> int(9) [1]=> int(28) [2]=> int(29) [3]=> int(8) }
Output for 5.5.36
array(4) { [0]=> int(12) [1]=> int(22) [2]=> int(14) [3]=> int(23) }
Output for 5.5.35
array(4) { [0]=> int(2) [1]=> int(32) [2]=> int(28) [3]=> int(10) }
Output for 5.5.34
array(4) { [0]=> int(16) [1]=> int(15) [2]=> int(11) [3]=> int(24) }
Output for 5.5.33
array(4) { [0]=> int(22) [1]=> int(6) [2]=> int(23) [3]=> int(31) }
Output for 5.5.32
array(4) { [0]=> int(16) [1]=> int(21) [2]=> int(14) [3]=> int(9) }
Output for 5.5.31
array(4) { [0]=> int(23) [1]=> int(22) [2]=> int(20) [3]=> int(21) }
Output for 5.5.30
array(4) { [0]=> int(32) [1]=> int(5) [2]=> int(31) [3]=> int(25) }
Output for 5.5.29
array(4) { [0]=> int(4) [1]=> int(31) [2]=> int(24) [3]=> int(30) }
Output for 5.5.28
array(4) { [0]=> int(28) [1]=> int(22) [2]=> int(7) [3]=> int(4) }
Output for 5.5.27
array(4) { [0]=> int(11) [1]=> int(18) [2]=> int(13) [3]=> int(7) }
Output for 5.5.26
array(4) { [0]=> int(9) [1]=> int(27) [2]=> int(21) [3]=> int(32) }
Output for 5.5.25
array(4) { [0]=> int(17) [1]=> int(14) [2]=> int(22) [3]=> int(19) }
Output for 5.5.24
array(4) { [0]=> int(22) [1]=> int(20) [2]=> int(9) [3]=> int(11) }
Output for 5.5.23
array(4) { [0]=> int(12) [1]=> int(22) [2]=> int(9) [3]=> int(1) }
Output for 5.5.22
array(4) { [0]=> int(25) [1]=> int(20) [2]=> int(23) [3]=> int(6) }
Output for 5.5.21
array(4) { [0]=> int(23) [1]=> int(16) [2]=> int(30) [3]=> int(7) }
Output for 5.5.20
array(4) { [0]=> int(3) [1]=> int(21) [2]=> int(19) [3]=> int(6) }
Output for 5.5.19
array(4) { [0]=> int(2) [1]=> int(29) [2]=> int(9) [3]=> int(24) }
Output for 5.5.18
array(4) { [0]=> int(29) [1]=> int(31) [2]=> int(2) [3]=> int(9) }
Output for 5.5.16
array(4) { [0]=> int(16) [1]=> int(31) [2]=> int(8) [3]=> int(19) }
Output for 5.5.15
array(4) { [0]=> int(14) [1]=> int(11) [2]=> int(24) [3]=> int(2) }
Output for 5.5.14
array(4) { [0]=> int(14) [1]=> int(16) [2]=> int(7) [3]=> int(24) }
Output for 5.5.13
array(4) { [0]=> int(10) [1]=> int(15) [2]=> int(23) [3]=> int(28) }
Output for 5.5.12
array(4) { [0]=> int(24) [1]=> int(26) [2]=> int(5) [3]=> int(31) }
Output for 5.5.11
array(4) { [0]=> int(1) [1]=> int(13) [2]=> int(30) [3]=> int(19) }
Output for 5.5.10
array(4) { [0]=> int(29) [1]=> int(17) [2]=> int(10) [3]=> int(27) }
Output for 5.5.9
array(4) { [0]=> int(28) [1]=> int(2) [2]=> int(17) [3]=> int(14) }
Output for 5.5.8
array(4) { [0]=> int(15) [1]=> int(4) [2]=> int(32) [3]=> int(19) }
Output for 5.5.7
array(4) { [0]=> int(15) [1]=> int(29) [2]=> int(28) [3]=> int(21) }
Output for 5.5.6
array(4) { [0]=> int(7) [1]=> int(9) [2]=> int(28) [3]=> int(3) }
Output for 5.5.5
array(4) { [0]=> int(21) [1]=> int(32) [2]=> int(28) [3]=> int(12) }
Output for 5.5.4
array(4) { [0]=> int(19) [1]=> int(4) [2]=> int(13) [3]=> int(14) }
Output for 5.5.3
array(4) { [0]=> int(21) [1]=> int(2) [2]=> int(30) [3]=> int(24) }
Output for 5.5.2
array(4) { [0]=> int(11) [1]=> int(31) [2]=> int(27) [3]=> int(6) }
Output for 5.5.1
array(4) { [0]=> int(6) [1]=> int(22) [2]=> int(13) [3]=> int(30) }
Output for 5.5.0
array(4) { [0]=> int(27) [1]=> int(3) [2]=> int(14) [3]=> int(2) }
Output for 5.4.45
array(4) { [0]=> int(28) [1]=> int(11) [2]=> int(15) [3]=> int(18) }
Output for 5.4.44
array(4) { [0]=> int(10) [1]=> int(18) [2]=> int(20) [3]=> int(7) }
Output for 5.4.43
array(4) { [0]=> int(19) [1]=> int(31) [2]=> int(16) [3]=> int(1) }
Output for 5.4.42
array(4) { [0]=> int(28) [1]=> int(15) [2]=> int(3) [3]=> int(6) }
Output for 5.4.41
array(4) { [0]=> int(9) [1]=> int(15) [2]=> int(32) [3]=> int(22) }
Output for 5.4.40
array(4) { [0]=> int(8) [1]=> int(20) [2]=> int(4) [3]=> int(18) }
Output for 5.4.39
array(4) { [0]=> int(19) [1]=> int(22) [2]=> int(32) [3]=> int(13) }
Output for 5.4.38
array(4) { [0]=> int(3) [1]=> int(26) [2]=> int(6) [3]=> int(4) }
Output for 5.4.37
array(4) { [0]=> int(2) [1]=> int(1) [2]=> int(21) [3]=> int(28) }
Output for 5.4.36
array(4) { [0]=> int(6) [1]=> int(8) [2]=> int(15) [3]=> int(12) }
Output for 5.4.35
array(4) { [0]=> int(11) [1]=> int(6) [2]=> int(24) [3]=> int(22) }
Output for 5.4.34
array(4) { [0]=> int(16) [1]=> int(19) [2]=> int(2) [3]=> int(17) }
Output for 5.4.32
array(4) { [0]=> int(12) [1]=> int(4) [2]=> int(21) [3]=> int(7) }
Output for 5.4.31
array(4) { [0]=> int(27) [1]=> int(13) [2]=> int(29) [3]=> int(32) }
Output for 5.4.30
array(4) { [0]=> int(31) [1]=> int(21) [2]=> int(25) [3]=> int(24) }
Output for 5.4.29
array(4) { [0]=> int(30) [1]=> int(17) [2]=> int(4) [3]=> int(6) }
Output for 5.4.28
array(4) { [0]=> int(10) [1]=> int(19) [2]=> int(18) [3]=> int(29) }
Output for 5.4.27
array(4) { [0]=> int(16) [1]=> int(26) [2]=> int(13) [3]=> int(22) }
Output for 5.4.26
array(4) { [0]=> int(10) [1]=> int(13) [2]=> int(3) [3]=> int(28) }
Output for 5.4.25
array(4) { [0]=> int(6) [1]=> int(5) [2]=> int(14) [3]=> int(25) }
Output for 5.4.24
array(4) { [0]=> int(17) [1]=> int(13) [2]=> int(16) [3]=> int(32) }
Output for 5.4.23
array(4) { [0]=> int(10) [1]=> int(32) [2]=> int(23) [3]=> int(15) }
Output for 5.4.22
array(4) { [0]=> int(24) [1]=> int(9) [2]=> int(28) [3]=> int(6) }
Output for 5.4.21
array(4) { [0]=> int(6) [1]=> int(31) [2]=> int(27) [3]=> int(32) }
Output for 5.4.20
array(4) { [0]=> int(14) [1]=> int(23) [2]=> int(12) [3]=> int(1) }
Output for 5.4.19
array(4) { [0]=> int(11) [1]=> int(9) [2]=> int(10) [3]=> int(19) }
Output for 5.4.18
array(4) { [0]=> int(17) [1]=> int(26) [2]=> int(14) [3]=> int(21) }
Output for 5.4.17
array(4) { [0]=> int(6) [1]=> int(30) [2]=> int(12) [3]=> int(2) }
Output for 5.4.16
array(4) { [0]=> int(27) [1]=> int(20) [2]=> int(9) [3]=> int(7) }
Output for 5.4.15
array(4) { [0]=> int(11) [1]=> int(23) [2]=> int(7) [3]=> int(20) }
Output for 5.4.14
array(4) { [0]=> int(32) [1]=> int(7) [2]=> int(1) [3]=> int(30) }
Output for 5.4.13
array(4) { [0]=> int(16) [1]=> int(21) [2]=> int(27) [3]=> int(23) }
Output for 5.4.12
array(4) { [0]=> int(26) [1]=> int(13) [2]=> int(32) [3]=> int(29) }
Output for 5.4.11
array(4) { [0]=> int(31) [1]=> int(6) [2]=> int(1) [3]=> int(23) }
Output for 5.4.10
array(4) { [0]=> int(20) [1]=> int(1) [2]=> int(23) [3]=> int(27) }
Output for 5.4.9
array(4) { [0]=> int(2) [1]=> int(11) [2]=> int(5) [3]=> int(32) }
Output for 5.4.8
array(4) { [0]=> int(17) [1]=> int(21) [2]=> int(5) [3]=> int(4) }
Output for 5.4.7
array(4) { [0]=> int(7) [1]=> int(28) [2]=> int(1) [3]=> int(4) }
Output for 5.4.6
array(4) { [0]=> int(23) [1]=> int(25) [2]=> int(15) [3]=> int(5) }
Output for 5.4.5
array(4) { [0]=> int(13) [1]=> int(8) [2]=> int(24) [3]=> int(12) }
Output for 5.4.4
array(4) { [0]=> int(30) [1]=> int(17) [2]=> int(10) [3]=> int(7) }
Output for 5.4.3
array(4) { [0]=> int(4) [1]=> int(26) [2]=> int(1) [3]=> int(6) }
Output for 5.4.2
array(4) { [0]=> int(27) [1]=> int(31) [2]=> int(29) [3]=> int(18) }
Output for 5.4.1
array(4) { [0]=> int(30) [1]=> int(22) [2]=> int(2) [3]=> int(8) }
Output for 5.4.0
array(4) { [0]=> int(6) [1]=> int(29) [2]=> int(30) [3]=> int(10) }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/eXEds on line 4
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
Parse error: parse error, unexpected '[' in /in/eXEds on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/eXEds on line 4
Process exited with code 255.