PHPackages                             ierusalim/php-random-gen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ierusalim/php-random-gen

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ierusalim/php-random-gen
========================

Random arrays, string, json-files generation

1.1.1(6y ago)0761Apache-2.0PHPPHP &gt;=5.5

Since Jul 10Pushed 6y ago2 watchersCompare

[ Source](https://github.com/ierusalim/php-random-gen)[ Packagist](https://packagist.org/packages/ierusalim/php-random-gen)[ RSS](/packages/ierusalim-php-random-gen/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

php-random-gen
==============

[](#php-random-gen)

[![Build Status](https://camo.githubusercontent.com/8ea084ff701ac70943ac872e3a388412caba1dced1e041fb3dd827090847467c/68747470733a2f2f6170692e7472617669732d63692e6f72672f6965727573616c696d2f7068702d72616e646f6d2d67656e2e7376673f6272616e63683d6d6173746572)](https://www.travis-ci.org/ierusalim/php-random-gen)[![codecov](https://camo.githubusercontent.com/1d075b52ed86cb68517f176c0043a3e685919223a0aeb06e892809639e9da721/68747470733a2f2f636f6465636f762e696f2f67682f6965727573616c696d2f7068702d72616e646f6d2d67656e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/ierusalim/php-random-gen)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4bbe270af6fdbc8fd46ef2a18f686c682e48dceea69cbde8f6f32de03d440e4e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6965727573616c696d2f7068702d72616e646f6d2d67656e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ierusalim/php-random-gen/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/d3af526a48aa91449ce513c765a1861e05d059c9c8e6905ea48dc80c13423966/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35393962326362302d636263322d346231332d626365322d6663373539653538653362372f6d696e692e706e67)](https://insight.sensiolabs.com/projects/599b2cb0-cbc2-4b13-bce2-fc759e58e3b7)

Random Data Library
-------------------

[](#random-data-library)

The library is easy to get up and running quickly. It is suitable for generating random bytes or strings from a given character set. It is possible to generate arrays of arbitrary depth of nesting as well as files with large data structures

Install
-------

[](#install)

Via Composer

```
$ composer require ierusalim/php-random-gen
```

Usage
-----

[](#usage)

#### Generation random strings

[](#generation-random-strings)

This simple functions placed in file RandomStr.php and have have no dependencies

- **genRandomStr**($len)
- **genRabdomBytes**($bytes\_cnt)
- **setChars**(*list of values from which the result will be generate*)

It is easy to understand from the examples below

```
