Throttle PHP function calls and iteration runs by X executions per second.
rackbeat/php-throttler is a Laravel package for throttle php function calls and iteration runs by x executions per second..
It currently has 11 GitHub stars and 36.562 downloads on Packagist (latest version 0.9.2).
Install it with composer require rackbeat/php-throttler.
Discover more Laravel packages by rackbeat
or browse all Laravel packages to compare alternatives.
Last updated
Throttle PHP actions to only run a set amount of times within a given timeframe.
Especially useful to avoid rate limiting, high CPU usage or DOS'ing your own services (database etc.)
You just require using composer and you're good to go!
composer require rackbeat/php-throttler
use Rackbeat\Throttler\Throttler;
Throttler::make( range(1,100) )->allow(10)->every(1)->run( function($value, $key) {
// do something with $value
} );