Download the PHP package kijin/phprandom without Composer

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

PHPRandom

Just another random number/string generator for PHP 5

This library is similar to ircmaxell/RandomLib, except it is compatible with PHP 5.0 and above, and comes with a much simpler interface. Seriously, PHP ain't Java. Why do we need a dozen files and classes inheriting one another just to get some random bytes? :p

How to Install

Traditional method:

include 'phprandom.php';

Composer:

"require": {
    "kijin/phprandom": "dev-master"
}

How to Use

Get a random integer between two endpoints (inclusive):

$random = PHPRandom::getInteger($min, $max);

Get a random floating-point number between 0 and 1:

$random = PHPRandom::getFloat();

Get a random alphanumeric string (0-9, a-z, A-Z):

$random = PHPRandom::getString($length);

Get a random hexademical string (0-9, a-f):

$random = PHPRandom::getHexString($length);

Get a random binary string:

$random = PHPRandom::getBinary($length);

Find out where your precious entropy comes from:

$sources = PHPRandom::listSources();

Configuration

PHPRandom requires no configuration.

You don't have to choose whether you want low-quality or high-quality entropy. You always get the highest quality of entropy that your system supports. Since the marginal cost of asking for high-quality entropy is negligible in most cases, there is rarely any need to ask for low-quality entropy.

Weaker sources of entropy are automatically mixed with other sources using the best mixing algorithm that your system supports.

Supported sources, in order of preference:

Supported mixers, in order of preference:

License

PHPRandom is free software released under the MIT license.


All versions of phprandom with dependencies

PHP Build Version
Package Version
Requires php Version >=5.0.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 kijin/phprandom contains the following files

Loading the files please wait ...