3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [1, 2, 3, 4, 5, 6, 7, 8, 9]; shuffle($list); print_r($list); // echo $list; // foreach($list as $key => $value){ // print "キー(\$key) : {$key} 値(\$value) : {$value}<br/>\n"; // } ?>
Output for 8.1.9
Array ( [0] => 3 [1] => 2 [2] => 7 [3] => 6 [4] => 4 [5] => 1 [6] => 8 [7] => 9 [8] => 5 )
Output for 8.1.8
Array ( [0] => 9 [1] => 8 [2] => 7 [3] => 1 [4] => 3 [5] => 5 [6] => 2 [7] => 6 [8] => 4 )
Output for 8.1.7
Array ( [0] => 1 [1] => 8 [2] => 6 [3] => 7 [4] => 2 [5] => 3 [6] => 5 [7] => 9 [8] => 4 )
Output for 8.1.6
Array ( [0] => 3 [1] => 2 [2] => 8 [3] => 1 [4] => 7 [5] => 4 [6] => 5 [7] => 6 [8] => 9 )
Output for 8.1.5
Array ( [0] => 1 [1] => 2 [2] => 4 [3] => 8 [4] => 9 [5] => 6 [6] => 5 [7] => 3 [8] => 7 )
Output for 8.1.4
Array ( [0] => 7 [1] => 1 [2] => 8 [3] => 5 [4] => 6 [5] => 2 [6] => 4 [7] => 9 [8] => 3 )
Output for 8.1.3
Array ( [0] => 6 [1] => 5 [2] => 7 [3] => 2 [4] => 3 [5] => 8 [6] => 1 [7] => 4 [8] => 9 )
Output for 8.1.2
Array ( [0] => 4 [1] => 5 [2] => 6 [3] => 3 [4] => 8 [5] => 9 [6] => 1 [7] => 2 [8] => 7 )
Output for 8.1.1
Array ( [0] => 3 [1] => 8 [2] => 9 [3] => 7 [4] => 4 [5] => 5 [6] => 1 [7] => 6 [8] => 2 )
Output for 8.1.0
Array ( [0] => 4 [1] => 3 [2] => 6 [3] => 9 [4] => 5 [5] => 2 [6] => 8 [7] => 7 [8] => 1 )
Output for 8.0.22
Array ( [0] => 8 [1] => 4 [2] => 9 [3] => 5 [4] => 6 [5] => 1 [6] => 3 [7] => 2 [8] => 7 )
Output for 8.0.21
Array ( [0] => 9 [1] => 8 [2] => 6 [3] => 1 [4] => 2 [5] => 7 [6] => 4 [7] => 5 [8] => 3 )
Output for 8.0.20
Array ( [0] => 1 [1] => 3 [2] => 6 [3] => 7 [4] => 5 [5] => 4 [6] => 2 [7] => 9 [8] => 8 )
Output for 8.0.19
Array ( [0] => 5 [1] => 3 [2] => 1 [3] => 4 [4] => 9 [5] => 2 [6] => 8 [7] => 7 [8] => 6 )
Output for 8.0.18
Array ( [0] => 1 [1] => 5 [2] => 4 [3] => 7 [4] => 9 [5] => 2 [6] => 3 [7] => 8 [8] => 6 )
Output for 8.0.17
Array ( [0] => 6 [1] => 9 [2] => 1 [3] => 2 [4] => 5 [5] => 4 [6] => 8 [7] => 7 [8] => 3 )
Output for 8.0.16
Array ( [0] => 4 [1] => 3 [2] => 8 [3] => 6 [4] => 2 [5] => 5 [6] => 1 [7] => 9 [8] => 7 )
Output for 8.0.15
Array ( [0] => 7 [1] => 5 [2] => 9 [3] => 3 [4] => 1 [5] => 2 [6] => 8 [7] => 4 [8] => 6 )
Output for 8.0.14
Array ( [0] => 8 [1] => 4 [2] => 9 [3] => 6 [4] => 3 [5] => 5 [6] => 7 [7] => 1 [8] => 2 )
Output for 8.0.13
Array ( [0] => 3 [1] => 4 [2] => 2 [3] => 9 [4] => 8 [5] => 1 [6] => 5 [7] => 7 [8] => 6 )
Output for 8.0.12
Array ( [0] => 9 [1] => 7 [2] => 5 [3] => 2 [4] => 3 [5] => 8 [6] => 1 [7] => 4 [8] => 6 )
Output for 8.0.11
Array ( [0] => 2 [1] => 5 [2] => 8 [3] => 7 [4] => 9 [5] => 4 [6] => 6 [7] => 1 [8] => 3 )
Output for 8.0.10
Array ( [0] => 1 [1] => 7 [2] => 6 [3] => 8 [4] => 3 [5] => 2 [6] => 9 [7] => 4 [8] => 5 )
Output for 8.0.9
Array ( [0] => 9 [1] => 1 [2] => 2 [3] => 4 [4] => 8 [5] => 5 [6] => 6 [7] => 7 [8] => 3 )
Output for 8.0.8
Array ( [0] => 9 [1] => 2 [2] => 6 [3] => 8 [4] => 3 [5] => 4 [6] => 5 [7] => 7 [8] => 1 )
Output for 8.0.7
Array ( [0] => 9 [1] => 6 [2] => 5 [3] => 1 [4] => 3 [5] => 8 [6] => 7 [7] => 4 [8] => 2 )
Output for 8.0.6
Array ( [0] => 2 [1] => 5 [2] => 7 [3] => 4 [4] => 1 [5] => 8 [6] => 3 [7] => 6 [8] => 9 )
Output for 8.0.5
Array ( [0] => 2 [1] => 4 [2] => 7 [3] => 6 [4] => 9 [5] => 3 [6] => 5 [7] => 8 [8] => 1 )
Output for 8.0.3
Array ( [0] => 2 [1] => 7 [2] => 8 [3] => 9 [4] => 5 [5] => 3 [6] => 6 [7] => 4 [8] => 1 )
Output for 8.0.2
Array ( [0] => 7 [1] => 6 [2] => 1 [3] => 2 [4] => 9 [5] => 3 [6] => 8 [7] => 4 [8] => 5 )
Output for 8.0.1
Array ( [0] => 9 [1] => 6 [2] => 3 [3] => 7 [4] => 1 [5] => 2 [6] => 4 [7] => 8 [8] => 5 )
Output for 7.4.30
Array ( [0] => 9 [1] => 3 [2] => 5 [3] => 1 [4] => 6 [5] => 7 [6] => 2 [7] => 4 [8] => 8 )
Output for 7.4.29
Array ( [0] => 1 [1] => 8 [2] => 6 [3] => 4 [4] => 7 [5] => 9 [6] => 3 [7] => 5 [8] => 2 )
Output for 7.4.28
Array ( [0] => 1 [1] => 3 [2] => 9 [3] => 2 [4] => 8 [5] => 7 [6] => 6 [7] => 5 [8] => 4 )
Output for 7.4.27
Array ( [0] => 9 [1] => 8 [2] => 5 [3] => 4 [4] => 3 [5] => 6 [6] => 1 [7] => 2 [8] => 7 )
Output for 7.4.26
Array ( [0] => 8 [1] => 3 [2] => 5 [3] => 1 [4] => 7 [5] => 9 [6] => 6 [7] => 2 [8] => 4 )
Output for 7.4.25
Array ( [0] => 7 [1] => 4 [2] => 3 [3] => 6 [4] => 2 [5] => 5 [6] => 8 [7] => 9 [8] => 1 )
Output for 7.4.24
Array ( [0] => 2 [1] => 7 [2] => 8 [3] => 5 [4] => 3 [5] => 4 [6] => 9 [7] => 1 [8] => 6 )
Output for 7.4.23
Array ( [0] => 6 [1] => 7 [2] => 9 [3] => 5 [4] => 3 [5] => 2 [6] => 1 [7] => 8 [8] => 4 )
Output for 7.4.22
Array ( [0] => 3 [1] => 9 [2] => 5 [3] => 4 [4] => 6 [5] => 7 [6] => 1 [7] => 8 [8] => 2 )
Output for 7.4.21
Array ( [0] => 3 [1] => 5 [2] => 6 [3] => 8 [4] => 1 [5] => 2 [6] => 9 [7] => 4 [8] => 7 )
Output for 7.4.20
Array ( [0] => 9 [1] => 1 [2] => 4 [3] => 3 [4] => 8 [5] => 5 [6] => 2 [7] => 6 [8] => 7 )
Output for 7.4.19
Array ( [0] => 4 [1] => 2 [2] => 8 [3] => 3 [4] => 6 [5] => 9 [6] => 7 [7] => 5 [8] => 1 )
Output for 7.4.18
Array ( [0] => 9 [1] => 7 [2] => 5 [3] => 1 [4] => 2 [5] => 4 [6] => 8 [7] => 3 [8] => 6 )
Output for 7.4.16
Array ( [0] => 7 [1] => 9 [2] => 2 [3] => 6 [4] => 1 [5] => 3 [6] => 8 [7] => 4 [8] => 5 )
Output for 7.4.15
Array ( [0] => 5 [1] => 8 [2] => 1 [3] => 7 [4] => 3 [5] => 4 [6] => 2 [7] => 6 [8] => 9 )
Output for 7.4.14
Array ( [0] => 6 [1] => 8 [2] => 5 [3] => 9 [4] => 1 [5] => 3 [6] => 7 [7] => 2 [8] => 4 )
Output for 7.4.13
Array ( [0] => 5 [1] => 6 [2] => 3 [3] => 8 [4] => 7 [5] => 1 [6] => 9 [7] => 2 [8] => 4 )
Output for 7.4.12
Array ( [0] => 5 [1] => 8 [2] => 3 [3] => 7 [4] => 4 [5] => 9 [6] => 6 [7] => 1 [8] => 2 )
Output for 7.4.11
Array ( [0] => 7 [1] => 4 [2] => 6 [3] => 8 [4] => 9 [5] => 5 [6] => 3 [7] => 1 [8] => 2 )
Output for 7.4.10
Array ( [0] => 2 [1] => 5 [2] => 3 [3] => 6 [4] => 9 [5] => 8 [6] => 4 [7] => 1 [8] => 7 )
Output for 7.4.9
Array ( [0] => 9 [1] => 3 [2] => 2 [3] => 8 [4] => 4 [5] => 7 [6] => 1 [7] => 5 [8] => 6 )
Output for 7.4.6, 7.4.8
Array ( [0] => 1 [1] => 9 [2] => 2 [3] => 8 [4] => 6 [5] => 3 [6] => 4 [7] => 7 [8] => 5 )
Output for 7.4.7
Array ( [0] => 5 [1] => 6 [2] => 7 [3] => 9 [4] => 3 [5] => 8 [6] => 1 [7] => 4 [8] => 2 )
Output for 7.4.5
Array ( [0] => 2 [1] => 5 [2] => 3 [3] => 8 [4] => 4 [5] => 6 [6] => 1 [7] => 9 [8] => 7 )
Output for 7.4.4
Array ( [0] => 2 [1] => 6 [2] => 4 [3] => 8 [4] => 9 [5] => 5 [6] => 3 [7] => 7 [8] => 1 )
Output for 7.4.3
Array ( [0] => 7 [1] => 1 [2] => 4 [3] => 9 [4] => 8 [5] => 2 [6] => 6 [7] => 3 [8] => 5 )
Output for 7.4.2
Array ( [0] => 8 [1] => 1 [2] => 9 [3] => 6 [4] => 3 [5] => 7 [6] => 4 [7] => 5 [8] => 2 )
Output for 7.4.1
Array ( [0] => 4 [1] => 5 [2] => 6 [3] => 3 [4] => 7 [5] => 8 [6] => 1 [7] => 9 [8] => 2 )
Output for 7.4.0
Array ( [0] => 3 [1] => 6 [2] => 5 [3] => 7 [4] => 9 [5] => 4 [6] => 2 [7] => 1 [8] => 8 )

preferences:
30.91 ms | 495 KiB | 5 Q