shuffle() static public method

Shuffles an array and keeps the keys
static public shuffle ( array $array ) : array
$array array The source array
return array The shuffled result array
コード例 #1
0
ファイル: ATest.php プロジェクト: LucasFyl/korakia
 public function testShuffle()
 {
     $users = $this->users;
     $users = a::shuffle($users);
     // the only testable thing is that keys still exist
     $this->assertTrue(isset($users['userA']));
 }
コード例 #2
0
ファイル: obj.php プロジェクト: narrenfrei/kirbycms
 function shuffle()
 {
     $this->_ = a::shuffle($this->_);
     return $this;
 }