Download the PHP package forever2077/php-random-string without Composer

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

Random string generator for PHP 8.0

Latest Version on Packagist Tests

This package can be used to generate a random string based on your set of characters or predefined ones. You can configure string length, prefix, suffix, and count of strings, or skip some strings under certain conditions...

Installation

You can install the package via composer:

Usage

Basic

Simple example without any configuration.

Length definition

You can control the length of the string. By default, it's 16 characters.

`

Predefined charset

If you want to generate a string consisting of numbers only, lowercase letters, or uppercase letters you can use predefined charsets.

Custom charset

Or you can use your custom charset for generating random string.

Skipping

Sometimes you may want to generate a random string but under certain conditions. For example, give me a string that is not part of this array.

Prefix and Suffix

If you want to add a prefix or suffix to generated string, you can do it like this.

Array of random strings

RandomString can generate more than just one string.

Uniqueness

It may happen (rarely, but it's possible) to have not unique strings in the generated array. If you want to avoid it, just change the config.

Everything in one line

You can use the fromArray method if you don't want to create 2 objects every time.

Testing

Security

While the RandomString class is designed to generate random and unpredictable string, it is important to note that it is not a cryptographically secure hash function and should not be used for sensitive applications such as password hashing or cryptographic key generation.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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


All versions of php-random-string with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 forever2077/php-random-string contains the following files

Loading the files please wait ....