3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "5" => "abc", "2" => "bca", "1" => "?", "33" => "he11o", ]; print_r($array); shuffle($array); print_r($array);
Output for 7.3.5
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => abc [1] => bca [2] => he11o [3] => ? )
Output for 7.1.27 - 7.1.28, 7.3.4
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => he11o [1] => abc [2] => ? [3] => bca )
Output for 7.3.2 - 7.3.3
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => ? [1] => bca [2] => abc [3] => he11o )
Output for 7.2.11, 7.3.1
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => he11o [1] => bca [2] => ? [3] => abc )
Output for 7.3.0
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => bca [1] => he11o [2] => abc [3] => ? )
Output for 7.2.5, 7.2.18
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => abc [1] => ? [2] => bca [3] => he11o )
Output for 7.2.8, 7.2.14, 7.2.17
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => ? [1] => abc [2] => he11o [3] => bca )
Output for 7.2.9, 7.2.16
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => ? [1] => he11o [2] => abc [3] => bca )
Output for 7.2.2, 7.2.6, 7.2.15
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => he11o [1] => bca [2] => abc [3] => ? )
Output for 7.2.0, 7.2.12 - 7.2.13
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => bca [1] => he11o [2] => ? [3] => abc )
Output for 7.2.10
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => bca [1] => abc [2] => he11o [3] => ? )
Output for 7.2.7
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => he11o [1] => abc [2] => bca [3] => ? )
Output for 7.2.4
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => abc [1] => bca [2] => ? [3] => he11o )
Output for 7.2.3
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => ? [1] => bca [2] => he11o [3] => abc )
Output for 7.2.1
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => ? [1] => he11o [2] => bca [3] => abc )
Output for 7.1.26
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => he11o [1] => ? [2] => abc [3] => bca )
Output for 7.1.25
Array ( [5] => abc [2] => bca [1] => ? [33] => he11o ) Array ( [0] => ? [1] => abc [2] => bca [3] => he11o )

preferences:
55.73 ms | 429 KiB | 5 Q