Download the PHP package tsoffereins/number-sorter without Composer

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

Number sorter

With this library you can finally sort your list of numbers the way you always wanted: alphabetically.

Installation

You can install the NumberSorter through composer:

This library requires PHP 5.6 or higher in order to work.

Usage

Sorting a list of number alphabetically is easy as 1 3 2:

Numeric list

The input list must be an array of only numeric values. This includes any value that would make is_numeric() return true. See php.net for more on that.

If you pass a non numeric value a TypeError will be thrown.

Language

By default numbers are sorted alphabetically in English, but if you'd like to sort in another language you can pass it to the constructor:

The NumberSorter library relies on the package kwn/number-to-words for translating numbers into words. Take a look at their documentation for the available locales.

Immutability

Passing an array by reference and sorting its contents, like PHP's sort() function does, might have been OK in the nineties, but proper code should limit side effects. Therefore, the NumberSorter does not alter the input array but returns a new array with the same numbers sorted alphabetically.

Support

Are you kidding me?!


All versions of number-sorter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
kwn/number-to-words Version ^1.6
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 tsoffereins/number-sorter contains the following files

Loading the files please wait ....