3v4l.org

run code in 200+ PHP versions simultaneously
<?php $a=array("a","b","c","d","e"); shuffle($a); var_dump($a);
based on PBfiM
Output for 7.2.0
array(5) { [0]=> string(1) "c" [1]=> string(1) "b" [2]=> string(1) "d" [3]=> string(1) "e" [4]=> string(1) "a" }
Output for 7.1.9, 7.1.12
array(5) { [0]=> string(1) "c" [1]=> string(1) "d" [2]=> string(1) "e" [3]=> string(1) "a" [4]=> string(1) "b" }
Output for 7.1.11
array(5) { [0]=> string(1) "a" [1]=> string(1) "d" [2]=> string(1) "c" [3]=> string(1) "b" [4]=> string(1) "e" }
Output for 7.1.10
array(5) { [0]=> string(1) "a" [1]=> string(1) "c" [2]=> string(1) "d" [3]=> string(1) "b" [4]=> string(1) "e" }
Output for 7.1.8
array(5) { [0]=> string(1) "b" [1]=> string(1) "a" [2]=> string(1) "d" [3]=> string(1) "c" [4]=> string(1) "e" }
Output for 7.1.7
array(5) { [0]=> string(1) "b" [1]=> string(1) "a" [2]=> string(1) "c" [3]=> string(1) "d" [4]=> string(1) "e" }
Output for 7.1.6
array(5) { [0]=> string(1) "e" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" [4]=> string(1) "a" }
Output for 7.1.5
array(5) { [0]=> string(1) "d" [1]=> string(1) "e" [2]=> string(1) "c" [3]=> string(1) "a" [4]=> string(1) "b" }
Output for 7.1.4
array(5) { [0]=> string(1) "d" [1]=> string(1) "a" [2]=> string(1) "c" [3]=> string(1) "e" [4]=> string(1) "b" }
Output for 7.1.3
array(5) { [0]=> string(1) "e" [1]=> string(1) "b" [2]=> string(1) "a" [3]=> string(1) "c" [4]=> string(1) "d" }
Output for 7.1.2
array(5) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "e" [3]=> string(1) "d" [4]=> string(1) "c" }
Output for 7.1.1
array(5) { [0]=> string(1) "d" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "e" [4]=> string(1) "a" }
Output for 7.1.0
array(5) { [0]=> string(1) "a" [1]=> string(1) "c" [2]=> string(1) "e" [3]=> string(1) "b" [4]=> string(1) "d" }