shuffle() 정적인 공개 메소드

Shuffles an array and keeps the keys
static public shuffle ( array $array ) : array
$array array The source array
리턴 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;
 }