Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find highest value
max(mixed $valuemixed ...$values): mixed
    {

        
$key $this->cleanRateLimiterKey($key);



        return 
max(0$this->cache->get($key.':timer') - $this->currentTime());

    }
    public function put($key$value$seconds)

    {

        return (bool) 
$this->connection()->setex(

            
$this->prefix.$key, (int) max(1$seconds), $this->serialize($value)

        );

    }
        $lua "return redis.call('exists',KEYS[1])<1 and redis.call('setex',KEYS[1],ARGV[2],ARGV[1])";



        return (bool) 
$this->connection()->eval(

            
$lua1$this->prefix.$key$this->serialize($value), (int) max(1$seconds)

        );

    }
    public function forPage($page$perPage)

    {

        
$offset max(0, ($page 1) * $perPage);



        return 
$this->slice($offset$perPage);

    }
            $hasMutex $event->mutex->exists($event) ? 'Has Mutex › ' '';



            
$dots str_repeat('.'max(

                
$terminalWidth mb_strlen($expression.$command.$nextDueDateLabel.$nextDueDate.$hasMutex) - 80

            
));




            
$command preg_replace("#(php artisan [\w\-:]+) (.+)#"'$1 <fg=yellow;options=bold>$2</>'$command);
            $runTimeWidth mb_strlen($runTime);

            
$width min(terminal()->width(), 150);

            
$dots max($width $descriptionWidth $runTimeWidth 100);



            
$this->output->write(str_repeat('<fg=gray>.</>'$dots), false$verbosity);

            
$this->output->write("<fg=gray>$runTime</>"false$verbosity);
                    $this->getPdo()->commit();

                }



                
$this->transactions max(0$this->transactions 1);



                if (
$this->afterCommitCallbacksShouldBeExecuted()) {

                    
$this->transactionsManager?->commit($this->getName());
            $this->getPdo()->commit();

        }



        
$this->transactions max(0$this->transactions 1);



        if (
$this->afterCommitCallbacksShouldBeExecuted()) {

            
$this->transactionsManager?->commit($this->getName());
    protected function handleCommitTransactionException(Throwable $e$currentAttempt$maxAttempts)

    {

        
$this->transactions max(0$this->transactions 1);



        if (
$this->causedByConcurrencyError($e) && $currentAttempt $maxAttempts) {

            return;
    {

        
$property $this->unions 'unionOffset' 'offset';



        
$this->$property max(0, (int) $value);



        return 
$this;

    }
                )

            )->
implode("\n");



            
$spaces str_repeat(' 'max($maxMethod mb_strlen($method), 0));



            
$dots str_repeat('.'max(

                
$terminalWidth mb_strlen($method.$spaces.$uri.$action) - - ($action 0), 0
            $spaces str_repeat(' 'max($maxMethod mb_strlen($method), 0));



            
$dots str_repeat('.'max(

                
$terminalWidth mb_strlen($method.$spaces.$uri.$action) - - ($action 0), 0

            
));



            
$dots = empty($dots) ? $dots $dots";
        $this->total $total;

        
$this->perPage = (int) $perPage;

        
$this->lastPage max((int) ceil($total $perPage), 1);

        
$this->path $this->path !== '/' rtrim($this->path'/') : $this->path;

        
$this->currentPage $this->setCurrentPage($currentPage$this->pageName);

        
$this->items $items instanceof Collection $items Collection::make($items);
    {

        return new 
WorkerOptions(

            
$this->option('name'),

            
max($this->option('backoff'), $this->option('delay')),

            
$this->option('memory'),

            
$this->option('timeout'),

            
$this->option('sleep'),
        }



        
$runTime number_format((microtime(true) - $this->latestStartedAt) * 10002).'ms';

        
$dots max(terminal()->width() - mb_strlen($job->resolveName()) - mb_strlen($runTime) - 310);



        
$this->output->write(' '.str_repeat('<fg=gray>.</>'$dots));

        
$this->output->write(" <fg=gray>$runTime</>");