3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('b','a','r','n','e','y'); $keys =array_rand($a,count($a)); foreach ($keys as $k) { echo $a[$k]; }
based on W1VjG
Output for 5.2.10 - 5.6.28, 7.0.0 - 7.1.0
barney
Output for hhvm-3.12.0
arbnye
Output for hhvm-3.10.0
nayber
Output for 5.2.9
yeanrb
Output for 5.2.8
bneayr
Output for 5.2.7
rnbyae
Output for 5.2.6
naeyrb
Output for 5.2.5
eabrny
Output for 5.2.4
nabrey
Output for 5.2.3
nyerab
Output for 5.2.2
baynre
Output for 5.2.1
renayb
Output for 5.2.0
nrybae
Output for 4.4.9, 5.1.6
yearbn
Output for 5.1.5
ryneab
Output for 4.4.6, 5.1.4
erybna
Output for 5.1.3
bnarye
Output for 5.1.2
baneyr
Output for 5.1.1
nbryae
Output for 5.1.0
yabrne
Output for 5.0.5
nabery
Output for 5.0.4
nearyb
Output for 5.0.3
yabner
Output for 5.0.2
nrabey
Output for 5.0.1
ynrbea
Output for 5.0.0
raenyb
Output for 4.4.8
ayernb
Output for 4.4.7
rybena
Output for 4.4.5
eyrbna
Output for 4.4.4
aybern
Output for 4.4.3
ebrany
Output for 4.4.2
yebarn
Output for 4.4.1
aebrny
Output for 4.4.0
ebynra
Output for 4.3.11
rnbeay
Output for 4.3.10
neyrab
Output for 4.3.9
yenarb
Output for 4.3.8
aeynrb
Output for 4.3.7
eaynrb
Output for 4.3.6
bnayer
Output for 4.3.5
nabyre
Output for 4.3.3 - 4.3.4
ybeanr
Output for 4.3.2
yerban
Output for 4.3.1
eryabn
Output for 4.3.0
ybnrea