Download the PHP package enzyme/loopy without Composer
On this page you can find all versions of the php package enzyme/loopy. 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 loopy
A loop library for PHP.
Installation
Run the following command inside of your project directory.
Usage
Simple
A simple loop over an array.
The above will output 1, 2, 3,
Deep
A deep loop over a multidimensional array.
The above will output 1, 2, 3, 4, 5, 6,
Filtered
A loop over a filtered array.
The above will output 1, 2, 4, 5,
Bags
The $bag
object passed to the callback function generally contains the follow information.
Key | Value | Description |
---|---|---|
key() | Key | The enumerable objects key for the given pass. |
value() | Value | The enumerable objects value for the given pass. |
cycle() | Current cycle (0 based) | How many times around the entire object the looper has gone. |
depth() | Current depth (0 based) | The current depth of the pass, for multidimensional arrays. |
index() | Current index (0 based) | The current index, in this case index is really a count of the number of items encountered so far. |
Filters
Filter | Description |
---|---|
SkipNulls | Will skip over any values which are null. |
Regex | Will test value against the supplied regular expression. |
Equal | Will test value for equality against the given rule. (===) |
Less | Will test that value is less than the give rule, or less than or equal if parameter 2 in the constructor is set to true. |
Greater | Will test that value is greater than the give rule, or greater than or equal if parameter 2 in the constructor is set to true. |
All versions of loopy with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.0
The package enzyme/loopy contains the following files
Loading the files please wait ....