Download the PHP package hoffmann-oss/arrays without Composer
On this page you can find all versions of the php package hoffmann-oss/arrays. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hoffmann-oss/arrays
More information about hoffmann-oss/arrays
Files in hoffmann-oss/arrays
Package arrays
Short Description PHP 7 array functions
License MIT
Homepage https://github.com/hoffmann-oss/arrays-php
Informations about the package arrays
hoffmann-oss/arrays-php
A PHP 7 array manipulation library.
Installation with Composer
This package is available on packagist, so you can use Composer to install it. Run the following command in your shell:
The Arrays
class
create()
Example:
the resulting array:
fill()
Example:
the resulting arrays:
replace()
Example:
the resulting arrays:
reverse()
Example:
the resulting arrays:
rotate()
Example:
the resulting arrays:
shuffle()
Example:
the resulting arrays:
swap()
Example:
the resulting array:
pick()
Example:
the resulting arrays:
The Arrays2d
class
The functions of this class assumes
that the parameter $array
is a rectangular array (y) of arrays (x).
create()
Example:
the resulting array:
fill()
Example:
the resulting arrays:
replace()
Example:
the resulting arrays:
reverseX()
Example:
the resulting arrays:
reverseY()
Example:
the resulting arrays:
rotateX()
Array columns rotate left if distance is greater than 0.
Example:
the resulting arrays:
rotateY()
Array rows rotate up if distance is greater than 0.
Example:
the resulting arrays:
shuffle()
Example:
the resulting arrays:
shuffleX()
Example:
the resulting arrays:
shuffleY()
Example:
the resulting arrays:
swap()
Example:
the resulting array:
swapX()
Example:
the resulting arrays:
swapY()
Example:
the resulting arrays:
pick()
Example:
the resulting arrays: