Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Counts all elements in an array or in a Countable object
count(Countable|array $value, int $mode = COUNT_NORMAL): int
$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';
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';
public function hasResolvedGuards()
{
return count($this->guards) > 0;
}
{
return count($this->guards) > 0;
}
{
$segments = explode('|', $this->recaller);
return count($segments) >= 3 && trim($segments[0]) !== '' && trim($segments[1]) !== '';
}
$segments = explode('|', $this->recaller);
return count($segments) >= 3 && trim($segments[0]) !== '' && trim($segments[1]) !== '';
}
$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()
if (is_array($job)) {
$count += count($job);
return with($this->prepareBatchedChain($job), function ($chain) {
return $chain->first()
{
$memcached = $this->createMemcachedInstance($connectionId);
if (count($credentials) === 2) {
$this->setCredentials($memcached, $credentials);
}
$memcached = $this->createMemcachedInstance($connectionId);
if (count($credentials) === 2) {
$this->setCredentials($memcached, $credentials);
}
$this->setCredentials($memcached, $credentials);
}
if (count($options)) {
$memcached->setOptions($options);
}
}
if (count($options)) {
$memcached->setOptions($options);
}
$valuesChunk = array_unique($valuesChunk);
if (count($valuesChunk) > 0) {
$this->store->connection()->del(...$valuesChunk);
}
} while (((string) $cursor) !== $defaultCursorValue);
if (count($valuesChunk) > 0) {
$this->store->connection()->del(...$valuesChunk);
}
} while (((string) $cursor) !== $defaultCursorValue);
$keys = (array) $keys;
if (count($keys) === 0) {
return;
}
if (count($keys) === 0) {
return;
}
$array = &$original;
while (count($parts) > 1) {
$part = array_shift($parts);
if (isset($array[$part]) && static::accessible($array[$part])) {
while (count($parts) > 1) {
$part = array_shift($parts);
if (isset($array[$part]) && static::accessible($array[$part])) {
return implode($glue, $array);
}
if (count($array) === 0) {
return '';
}
}
if (count($array) === 0) {
return '';
}
return '';
}
if (count($array) === 1) {
return end($array);
}
}
if (count($array) === 1) {
return end($array);
}
{
$requested = is_null($number) ? 1 : $number;
$count = count($array);
if ($requested > $count) {
throw new InvalidArgumentException(
$requested = is_null($number) ? 1 : $number;
$count = count($array);
if ($requested > $count) {
throw new InvalidArgumentException(
$keys = explode('.', $key);
foreach ($keys as $i => $key) {
if (count($keys) === 1) {
break;
}
foreach ($keys as $i => $key) {
if (count($keys) === 1) {
break;
}
public function count(): int
{
return count($this->items);
}
{
return count($this->items);
}
public function has($key)
{
$keys = array_flip(is_array($key) ? $key : func_get_args());
$count = count($keys);
foreach ($this as $key => $value) {
if (array_key_exists($key, $keys) && --$count == 0) {
{
$keys = array_flip(is_array($key) ? $key : func_get_args());
$count = count($keys);
foreach ($this as $key => $value) {
if (array_key_exists($key, $keys) && --$count == 0) {