Download the PHP package chr15k/array without Composer

On this page you can find all versions of the php package chr15k/array. 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 array

Awesome Array helpers for your PHP project

This package provides useful helpers for working with arrays in PHP.

Based on ...

Install

You can install this package via composer:

Usage

Arr::accessible()

The Arr::accessible method checks that the given value is array accessible:

Arr::add()

The Arr::add method adds a given key / value pair to an array if the given key doesn't already exist in the array or is set to null:

Arr::collapse()

The Arr::collapse method collapses an array of arrays into a single array:

Arr::crossJoin()

The Arr::crossJoin method cross joins the given arrays, returning a Cartesian product with all possible permutations:

Arr::divide()

The Arr::divide method returns two arrays, one containing the keys, and the other containing the values of the given array:

Arr::dot()

The Arr::dot method flattens a multi-dimensional array into a single level array that uses "dot" notation to indicate depth:

Arr::except()

The Arr::except method removes the given key / value pairs from an array:

Arr::exists()

The Arr::exists method checks that the given key exists in the provided array:

Arr::first()

The Arr::first method returns the first element of an array passing a given truth test:

Arr::flatten()

The Arr::flatten method flattens a multi-dimensional array into a single level array:

Arr::forget()

The Arr::forget method removes a given key / value pair from a deeply nested array using "dot" notation:

Arr::get()

The Arr::get method retrieves a value from a deeply nested array using "dot" notation:

Arr::has()

The Arr::has method checks whether a given item or items exists in an array using "dot" notation:

Arr::hasAny()

The Arr::hasAny method checks whether any item in a given set exists in an array using "dot" notation:

Arr::isAssoc()

The Arr::isAssoc returns true if the given array is an associative array. An array is considered "associative" if it doesn't have sequential numerical keys beginning with zero:

Arr::isMultiDimensional()

The Arr::isMultiDimensional method returns true if the given array is multi-dimensional

Arr::last()

The Arr::last method returns the last element of an array passing a given truth test:

Arr::only()

The Arr::only method returns only the specified key / value pairs from the given array:

Arr::pluck()

The Arr::pluck method retrieves all of the values for a given key from an array:

Arr::prepend()

The Arr::prepend method will push an item onto the beginning of an array:

Arr::pull()

The Arr::pull method returns and removes a key / value pair from an array:

Arr::query()

The Arr::query method converts the array into a query string:

Arr::random()

The Arr::random method returns a random value from an array:

Arr::set()

The Arr::set method sets a value within a deeply nested array using "dot" notation:

Arr::shuffle()

The Arr::shuffle method randomly shuffles the items in the array:

Arr::sort()

The Arr::sort method sorts an array by its values.

Arr::sortRecursive()

The Arr::sortRecursive method recursively sorts an array using the sort function for numeric sub=arrays and ksort for associative subarrays:

Arr::where()

The Arr::where method filters an array using the given Closure:

Arr::wrap()

The Arr::wrap method wraps the given value in an array. If the given value is already an array it will not be changed:

Testing

You can run the tests with:

License

The MIT License (MIT). Please see License File for more information.


All versions of array with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
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 chr15k/array contains the following files

Loading the files please wait ....