Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Create an array containing a range of elements
range(string|int|float $startstring|int|float $endint|float $step 1): array
    public static function range($from$to)

    {

        return new static(
range($from$to));

    }
        $collectionCount $this->count();



        foreach (
range(1min($count$collectionCount)) as $item) {

            
array_push($resultsarray_pop($this->items));

        }
        $collectionCount $this->count();



        foreach (
range(1min($count$collectionCount)) as $item) {

            
array_push($resultsarray_shift($this->items));

        }
        return array_map(function () use ($attributes$parent) {

            return 
$this->state($attributes)->getExpandedAttributes($parent);

        }, 
range(1$this->count));

    }
        $instances $this->newModel()->newCollection(array_map(function () use ($parent) {

            return 
$this->makeInstance($parent);

        }, 
range(1$this->count)));



        
$this->callAfterMaking($instances);
    public function getUrlRange($start$end)

    {

        return 
collect(range($start$end))->mapWithKeys(function ($page) {

            return [
$page => $this->url($page)];

        })->
all();

    }
        foreach ($ranges as $range) {

            if (
preg_match('/^[0-9]+\-[0-9]+$/'$range)) {

                
$ids array_merge($idsrange(...explode('-'$range)));

            }

        }
    {

        
$slots array_map(function ($i) {

            return 
$this->name.$i;

        }, 
range(1$this->maxLocks));



        return 
$this->redis->eval(...array_merge(

            [
$this->lockScript(), count($slots)],
    protected function forEachProcess($callback)

    {

        
collect(range(1$this->options->processes()))->each(function ($token) use ($callback) {

            
tap($this->createApplication(), function ($app) use ($callback$token) {

                
ParallelTesting::resolveTokenUsing(fn () => $token);
        $previous null;



        foreach (
range(010) as $ignored) {

            
$this->assertNotSame($previous$previous $model->virtualString);

        }

    }
        $this->assertIsBool($first);



        foreach (
range(010) as $ignored) {

            
$this->assertSame($first$model->virtual_boolean_cached);

        }

    }
        $this->assertSame(1$model->virtualNullCalls);



        foreach (
range(010) as $ignored) {

            
$this->assertSame($first$model->virtual_null_cached);

        }
        $this->assertIsBool($first);



        foreach (
range(050) as $ignored) {

            
$current $model->virtual_boolean;



            
$this->assertIsBool($current);
        $previous $model->virtualObject;



        foreach (
range(010) as $ignored) {

            
$this->assertSame($previous$previous $model->virtualObject);

        }

    }
        $previous $model->virtualDateTime;



        foreach (
range(010) as $ignored) {

            
$this->assertSame($previous$previous $model->virtualDateTime);

        }

    }