mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-29 06:26:22 +00:00
16 lines
340 B
Markdown
16 lines
340 B
Markdown
---
|
|
id: 84047ab5-ea5d-4ebe-9ea4-8a89d0a8cc22
|
|
title: fromRandom()
|
|
---
|
|
|
|
# Description
|
|
|
|
Generates random alphanumeric strings
|
|
|
|
# Syntax
|
|
|
|
``` php
|
|
$random = ByteString::fromRandom(6); // 'g6UkL2'
|
|
$randomPin = ByteString::fromRandom(4, '0123456789'); // '7385'
|
|
$randomKey = ByteString::fromRandom(1, 'WASD'); // 'S'
|
|
```
|