PHP code example of fyre / array
1. Go to this page and download the library: Download fyre/array library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fyre / array example snippets
use Fyre\Utility\Arr;
$chunk = Arr::chunk($array, $size, $preserveKeys);
$collapsed = Arr::collapse($array, ...$replacements);
$column = Arr::column($array, $key);
$combined = Arr::combine($keys, $values);
$count = Arr::count($array, $mode);
$diff = Arr::diff($array, ...$arrays);
$divided = Arr::divide($array);
$dot = Arr::dot($array, $prefix);
$except = Arr::except($array, $keys);
$filled = Arr::fill($amount, $value);
$filtered = Arr::filter($array, $callback);
$find = Arr::find($array, $callback, $default);
$findLast = Arr::findLast($array, $callback, $default);
$flattened = Arr::flatten($array, $maxDepth);
$forgetDot = Arr::forgetDot($array, $key);
$getDot = Arr::getDot($array, $key, $defaultValue);
$hasDot = Arr::hasDot($array, $key);
$hasKey = Arr::hasKey($array, $key);
$
$index = Arr::index($array, $key);
$indexOf = Arr::indexOf($array, $value, $strict);
$intersect = Arr::intersect($array, ...$arrays);
$isArray = Arr::isArray($value);
$isList = Arr::isList($array);
$joined = Arr::join($array, $separator);
$keys = Arr::keys($array);
$lastIndexOf = Arr::lastIndexOf($array, $value, $strict);
$map = Arr::map($array, $callback);
$merged = Arr::merge($array, ...$arrays);
$only = Arr::only($array, $keys);
$padded = Arr::pad($array, $size, $value);
$values = Arr::pluckDot($arrays, $key);
$pop = Arr::pop($array);
$newCount = Arr::push($array, ...$values);
$randomValue = Arr::randomValue($array);
$range = Arr::range($start, $end, $step);
$reduced = Arr::reduce($array, $callback, $initial);
$reversed = Arr::reverse($array);
$setDot = Arr::setDot($array, $key, $value, $overwrite);
$shift = Arr::shift($array);
$shuffled = Arr::shuffle($array);
$slice = Arr::slice($array, $offset, $length, $preserveKeys);
$sorted = Arr::sort($array, $sort);
$spliced = Arr::splice($array, $offset, $length, $replacement);
$unique = Arr::unique($array);
$newCount = Arr::unshift($array, ...$values);
$values = Arr::values($array);
$wrapped = Arr::wrap($value);