public function random()
    {
        $objReturn = null;

        $intIndex = rand(0, (count($this->collection) - 1));
        if (isset($this->collection[$intIndex])) {
            $objReturn = $this->collection[$intIndex];
        }

        return $objReturn;
    }
public function random()
    {
        $objReturn = null;

        $intIndex = rand(0, (count($this->collection) - 1));
        if (isset($this->collection[$intIndex])) {
            $objReturn = $this->collection[$intIndex];
        }

        return $objReturn;
    }
public function random ( ) { $ objReturn = null ; $ intIndex = rand ( 0 , ( count ( $ this -> collection ) - 1 ) ) ; if ( isset ( $ this -> collection [ $ intIndex ] ) ) { $ objReturn = $ this -> collection [ $ intIndex ] ; } return $ objReturn ; }
Pick a random child element
@return mixed Randomly selected item from collection
Pick a random child element