Download the PHP package jamsouf/repeat without Composer
On this page you can find all versions of the php package jamsouf/repeat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package repeat
Repeat
Repeat is a repeater utility for PHP / Composer.
It makes it easy to repeat calling a function or similar operations.
Installation
Via composer
Install the latest version with composer require jamsouf/repeat
Examples
Call a anonymous function 100 times
Call a named function and access in each call the current result
Call a named function until a specific condition
Repeat a string with index reference and delimiter until a specific condition
API Documentation
Repeat::_function($count, $func, $until = null)
Repeat calling a function
- integer
$count
: How often the function should be called - callable
$func
: Function to call repeated - callable
$until
(optional): Repeat calling until this function returns true - => return array: Results from each function call
Repeat::_string($count, $string, $until = null, $delimiter = null)
Repeat a string
- integer
$count
: How often the string should be repeated - string
$string
: String to repeat - callable
$until
(optional): Repeat the string until this function returns true - string
$delimiter
(optional): Signs to separate the strings - => return string: Repeated string
All versions of repeat with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package jamsouf/repeat contains the following files
Loading the files please wait ....