Return some random words.

@param integer $count How many words to return.
@return array
496588
public static function words($count = 3)
    {
        if ($count === 1) {
            return static::$words[array_rand(static::$words, $count)];
        } else {
            return array_intersect_key(static::$words, array_flip(array_rand(static::$words, $count)));
        }
    }
436337
public function stream_read($count)
    {
        if ($this->stream_eof()) {
            return false;
        }
        $s = substr($this->data, $this->pos, $count);
        $this->pos += $count;
        return $s;
    }
341197
public static function getRunDates($time, $count = 10)
    {
        try {
            $cron = CronExpression::factory($time);
            $dates = $cron->getMultipleRunDates($count);
        } catch (\Exception $e) {
            return array();
        }
        return $dates;
    }
1011567
protected function generatePassword($count = 10)
    {
        $passwd = '';
        $possible = '23456789ABCDEFGHJKLMNPQRSTVWXYZabcdefghijkmnpqrstvwxyz';
        $i = 0;
        while ($i < $count) {
            $char = $possible[random_int(0, \strlen($possible) - 1)];
            $passwd .= $char;
            ++$i;
        }

        return $passwd;
    }
507588
protected function getListReportLibrary($count = false)
    {
        $list = $this->library->getList();
        $this->prepareListLibrary($list);

        $allowed = $this->getAllowedFiltersReportLibrary();

        $this->filterList($list, $allowed, $this->query_filter);
        $this->sortList($list, $allowed, $this->query_filter, array('name' => 'desc'));

        if ($count) {
            return count($list);
        }

        $this->limitList($list, $this->data_limit);
        return $list;
    }
930274
public function rewind(int $count): Content
    {
        $this->pos -= $count;
        if ($this->pos < 0) {
            $this->pos = 0;
        }

        return $this;
    }
156990
private function getPlain($count, $loremipsum, $returnStr = true)
    {
        $words = [];
        $this->getWords($words, $count, $loremipsum);
        //print_r($words);

        $delta = $count;
        $curr = 0;
        $sentences = [];
        while ($delta > 0) {
            $senSize = $this->gaussianSentence();
            //echo $curr . '<br />';
            if (($delta - $senSize) < 4) {
                $senSize = $delta;
            }

            $delta -= $senSize;

            $sentence = [];
            for ($i = $curr; $i < ($curr + $senSize); ++$i) {
                $sentence[] = $words[$i];
            }

            $this->punctuate($sentence);
            $curr = $curr + $senSize;
            $sentences[] = $sentence;
        }

        if ($returnStr) {
            $output = '';
            foreach ($sentences as $s) {
                foreach ($s as $w) {
                    $output .= $w.' ';
                }
            }

            return $output;
        }

        return $sentences;
    }
27073
public function getEmailsBy($criteria, $count)
    {
        $mails = [];
        $mailIds = $this->search($criteria);

        if (!$count) {
            if (!$mailIds) {
                throw new \Exception(sprintf("No email found with given criteria %s", $criteria));
            }
        }

        foreach ($mailIds as $mailId) {
            $mails[] = $this->mailbox->getMail($mailId);

        }

        return $mails;
    }
375356
public function items($count = false)
    {
        $this->query = $this->model->newQuery();

        return $this->query($count);
    }
497892
protected function _getDefaultMessages($count)
    {
        $context       = $this->_configRead('context');
        $contextPlural = Inflector::pluralize($context);
        $countString   = sprintf('<strong>%s</strong>', $count);
        return [
            'delete' => __dn(
                'core',
                'One ' . $context . ' success removed',
                '{0} ' . $contextPlural . ' success removed',
                $count,
                $countString
            ),
            'publish' => __dn(
                'core',
                'One ' . $context . ' success publish',
                '{0} ' . $contextPlural . ' success published',
                $count,
                $countString
            ),
            'unpublish' => __dn(
                'core',
                'One ' . $context . ' success unpublish',
                '{0} ' . $contextPlural . ' success unpublished',
                $count,
                $countString
            ),
        ];
    }
839384
public function getLogFiles($count = 20)
    {
        $files = glob(storage_path('logs/*'));
        $files = array_combine($files, array_map("filemtime", $files));
        arsort($files);

        $files = array_map('basename', array_keys($files));

        return array_slice($files, 0, $count);
    }
62605
protected function doRead(int $offset, int $count): string
    {
        if (($offset + $count) > $this->size) {
            $count = $this->size - $offset;
        }

        $result = '';
        for ($i = 0; $i < $count; $i++) {
            $result .= $this->content[$i + $offset] ?? ' ';
        }

        return $result;
    }
724756
public function stream_read($count)
    {
        $ret = substr($this->data, $this->position, $count);
        $this->position += strlen($ret);
        return $ret;
    }
984496
public function read($count)
    {
        $data = substr($this->content, $this->bytes_read, $count);
        $this->bytes_read  += $count;
        $this->lastAccessed = time();
        return $data;
    }
888905
public function append($count)
    {
        $bufferLen = strlen($this->buffer);

        if ($bufferLen >= $count + $this->maxAhead) {
            return $bufferLen;
        }

        ($ahead = $this->readAhead)
            && ($delta = $bufferLen - $ahead) < 0
            && $count -= $delta;

        $read = fread($this->handle, $count);
        if ($read === false) {
            throw new UnexpectedValueException(sprintf('Can not deal with fread() errors.'));
        }

        if ($readLen = strlen($read)) {
            $this->buffer .= $read;
            $bufferLen += $readLen;
        }

        return $bufferLen;
    }
165790
public function stream_read($count) {
		if ($this->_lob->eof() || !$count) {
			return '';
		}

		// CLOB to return characters not bytes
		return $this->_lob->read($count / 2); // Fix we expect 2 byte char
	}
936613
public static function random($count = 8, $keys = 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTWXYZ')
        {
            mt_srand((double)microtime() * 1000000);
            $random = [];
            $length = strlen($keys) - 1;
            for ($i = 0; $i < $count; ++$i) {
                $random[] = $keys[mt_rand(0, $length)];
            }
            return new static(implode('', $random));
        }