Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Counts all elements in an array or in a Countable object
<?php count(Countable|array $value, int $mode = COUNT_NORMAL): int
<?php $classDirnameSegments = explode('\\', $classDirname);
return Arr::wrap(Collection::times(count($classDirnameSegments), function ($index) use ($class, $classDirnameSegments) {
$classDirname = implode('\\', array_slice($classDirnameSegments, 0, $index));
return $classDirname.'\\Policies\\'.class_basename($class).'Policy';
<?php public function hasResolvedGuards()
{
return count($this->guards) > 0;
}
<?php {
$segments = explode('|', $this->recaller);
return count($segments) >= 3 && trim($segments[0]) !== '' && trim($segments[1]) !== '';
}
<?php $job = $job instanceof Closure ? CallQueuedClosure::create($job) : $job;
if (is_array($job)) {
$count += count($job);
return with($this->prepareBatchedChain($job), function ($chain) {
return $chain->first()
<?php public function many(array $keys)
{
if (count($keys) === 0) {
return [];
}
<?php public function putMany(array $values, $seconds)
{
if (count($values) === 0) {
return true;
}
<?php {
$memcached = $this->createMemcachedInstance($connectionId);
if (count($credentials) === 2) {
$this->setCredentials($memcached, $credentials);
}
<?php $this->setCredentials($memcached, $credentials);
}
if (count($options)) {
$memcached->setOptions($options);
}
<?php public function many(array $keys)
{
if (count($keys) === 0) {
return [];
}
<?php $entries = array_unique(array_keys($entries));
if (count($entries) === 0) {
continue;
}
<?php $keys = (array) $keys;
if (count($keys) === 0) {
return;
}
<?php $array = &$original;
while (count($parts) > 1) {
$part = array_shift($parts);
if (isset($array[$part]) && static::accessible($array[$part])) {
<?php return implode($glue, $array);
}
if (count($array) === 0) {
return '';
}
<?php return '';
}
if (count($array) === 1) {
return end($array);
}
<?php {
$requested = is_null($number) ? 1 : $number;
$count = count($array);
if ($requested > $count) {
throw new InvalidArgumentException(