shuffle() static public méthode

Shuffles an array and keeps the keys
static public shuffle ( array $array ) : array
$array array The source array
Résultat array The shuffled result array
Exemple #1
0
 public function testShuffle()
 {
     $users = $this->users;
     $users = a::shuffle($users);
     // the only testable thing is that keys still exist
     $this->assertTrue(isset($users['userA']));
 }
Exemple #2
0
 function shuffle()
 {
     $this->_ = a::shuffle($this->_);
     return $this;
 }