Download the PHP package mrbrownnl/random-nickname-generator without Composer

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

PHP random nickname generator

Latest Version on Packagist Total Downloads

Generates random nicknames based on an adjective (optional) + name + number (optional).

Installation

You can install the package via composer:

Basic usage

Using the Laravel facade

If you are using Laravel 5.5 and up, the service provider will automatically get registered.

For older versions of Laravel (<5.5), you have to add the service provider:

config/app.php

To override the default config parameters in Laravel you can publish the config file to and specify your own parameters. `

Using the facade:

or test it:

Default config parameters

The default package dictionaries are used when no or empty dictionaries are specified on class instantiating.

Function reference

Function Description
Generates a random nickname which is not stored in the uniquely generated nickname list or checked for uniqueness.
Generates a unique random nickname which is not in the given array.
Returns the total number of possible unique nicknames with the given configuration parameters.

Performance

The table below shows how much time it takes to generate a unique name.

While compiling custom adjective or name dictionaries, keep in mind that performance drops drastically if only 1% or less unique nicknames are left.

The table below shows the performance when 150.000 unique nicknames are possible.

Available nicknames Time
100 % 0.001 s
70 % 0.006 s
40 % 0.014 s
10 % 0.025 s
5 % 0.030 s
1 % 0.060 s

Changelog

Please see CHANGELOG for more information what has changed recently.

License

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


All versions of random-nickname-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
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 mrbrownnl/random-nickname-generator contains the following files

Loading the files please wait ....