3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myarray = array("Google" => array("Name" => "Google", "URL" => "www.google.com", "Usage" => "Googling"), "Yahoo" => array("Name" => "Yahoo", "URL" => "www.yahoo.com", "Usage" => "Yahooing?"), "Ask" => array("Name" => "Ask", "URL" => "www.ask.com", "Usage" => "Asking Jeeves")); var_dump($myarray); shuffle($myarray); var_dump($myarray);
based on 1tIng
Output for 7.2.2, 7.2.5, 7.2.16 - 7.3.0, 7.3.4
array(3) { ["Google"]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } ["Yahoo"]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } ["Ask"]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } } array(3) { [0]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } [1]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } [2]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } }
Output for 7.2.3, 7.3.3
array(3) { ["Google"]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } ["Yahoo"]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } ["Ask"]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } } array(3) { [0]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } [1]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } [2]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } }
Output for 7.1.25, 7.1.28, 7.2.6, 7.2.10 - 7.2.13, 7.3.1 - 7.3.2
array(3) { ["Google"]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } ["Yahoo"]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } ["Ask"]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } } array(3) { [0]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } [1]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } [2]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } }
Output for 7.1.26, 7.2.7 - 7.2.8, 7.2.14 - 7.2.15
array(3) { ["Google"]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } ["Yahoo"]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } ["Ask"]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } } array(3) { [0]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } [1]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } [2]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } }
Output for 7.2.1, 7.2.9
array(3) { ["Google"]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } ["Yahoo"]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } ["Ask"]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } } array(3) { [0]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } [1]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } [2]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } }
Output for 7.1.27, 7.2.0, 7.2.4
array(3) { ["Google"]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } ["Yahoo"]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } ["Ask"]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } } array(3) { [0]=> array(3) { ["Name"]=> string(6) "Google" ["URL"]=> string(14) "www.google.com" ["Usage"]=> string(8) "Googling" } [1]=> array(3) { ["Name"]=> string(3) "Ask" ["URL"]=> string(11) "www.ask.com" ["Usage"]=> string(13) "Asking Jeeves" } [2]=> array(3) { ["Name"]=> string(5) "Yahoo" ["URL"]=> string(13) "www.yahoo.com" ["Usage"]=> string(9) "Yahooing?" } }