Download the PHP package tezmanian/utils-arr without Composer

On this page you can find all versions of the php package tezmanian/utils-arr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package utils-arr

tez-utils-arr

CI Packagist Version PHP

A collection of focused, stateless array utility classes for PHP 8.3+. Each class does one thing and exposes a clean static API.

Installation

Package: tezmanian/utils-arr · Namespace: Tezmanian\Utils\Arr

Components

Class Purpose
ArrayDiff Recursively compares two arrays and returns all differences with dot-notation paths
CartesianProduct Computes the Cartesian product of any number of sets lazily via a Generator
DeepMerge Recursively merges override arrays into a base array
Find Returns the first or last item matching a predicate
Flatten Flattens a nested array into a single list
GroupBy Groups items by a key derived from a callback
KeyBy Builds an associative lookup map from a list
MapWithKeys Maps over an array where the callback returns a [key => value] pair
Paginator Paginates an array and returns an immutable Page with slice and metadata
Partition Splits an array into two lists in a single pass
Pluck Extracts values from an array of records using dot-notation keys
SafeGet Safely reads typed values from deeply nested arrays using dot-notation paths
Sliding Produces consecutive overlapping windows of a fixed size
SortBy Sorts a copy of the array by a derived key
Transpose Swaps rows and columns of a 2D array
UniqueBy Removes duplicates where uniqueness is determined by a callback
Wrap Ensures any value is an array
Zip Combines multiple arrays element-by-element into a list of tuples

ArrayDiff

Recursively compares two arrays and returns all differences with dot-notation paths.

Comparison is strict (1 !== "1"). Keys are reported as ChangeType::Added, ChangeType::Removed, or ChangeType::Changed.


CartesianProduct

Computes the Cartesian product of any number of sets lazily via a Generator.

No intermediate array is built — suitable for large input sets.


DeepMerge

Recursively merges override arrays into a base array. Multiple overrides are applied left to right.

String keys are merged recursively when both sides are arrays. Integer keys are appended (like array_merge). Scalar values on the right side always win.


Find

Returns the first or last item matching a predicate.


Flatten

Flattens a nested array into a single list. Accepts an optional depth limit.


GroupBy

Groups items by a key derived from a callback.


KeyBy

Builds an associative lookup map from a list. When two items produce the same key, the last wins.


MapWithKeys

Maps over an array where the callback returns a [key => value] pair.


Paginator

Paginates an array and returns an immutable Page with slice and metadata.

Throws InvalidArgumentException when $page < 1 or $perPage < 1.


Partition

Splits an array into two lists in a single pass — items passing the predicate first, failing items second.


Pluck

Extracts values from an array of records using dot-notation keys.

Items where the key is absent are silently skipped.


SafeGet

Safely reads typed values from deeply nested arrays using dot-notation paths. Returns null (or a default) when any segment is missing.

Integer-looking segments (e.g. "0") address list indices automatically.


Sliding

Produces consecutive overlapping windows of a fixed size.


SortBy

Sorts a copy of the array by a derived key. Never mutates the original. Result is always re-indexed.


Transpose

Swaps rows and columns of a 2D array. All rows must have the same column count.


UniqueBy

Removes duplicates where uniqueness is determined by a callback.


Wrap

Ensures any value is an array. null becomes [], arrays pass through, everything else gets wrapped.


Zip

Combines multiple arrays element-by-element into a list of tuples.


Requirements

Development

License

MIT — see LICENSE.

Author: René Halberstadt


All versions of utils-arr with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
tezmanian/utils-enum Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tezmanian/utils-arr contains the following files

Loading the files please wait ...