src/ORM/Collection.php
public function random($num = 1)
	{
		if ($num == 1)
			return $this->members[array_rand($this->members)];

		$keys = array_rand($this->members, $num);
		return new static(array_intersect_key($this->members, array_flip($keys)));
	}
public function random($num = 1)
	{
		if ($num == 1)
			return $this->members[array_rand($this->members)];

		$keys = array_rand($this->members, $num);
		return new static(array_intersect_key($this->members, array_flip($keys)));
	}
public function random ( $ num = 1 ) { if ( $ num == 1 ) return $ this -> members [ array_rand ( $ this -> members ) ] ; $ keys = array_rand ( $ this -> members , $ num ) ; return new static ( array_intersect_key ( $ this -> members , array_flip ( $ keys ) ) ) ; }
Get one or more random members from the collection.

@link	http://php.net/manual/en/function.array-rand.php

@param  int  $num
@return mixed
Get one or more random members from the collection .