axy/random

生成伪随机数

0.2.1 2023-03-16 14:51 UTC

This package is auto-updated.

Last update: 2024-09-16 17:49:45 UTC


README

PHP中的随机序列生成。目前这个包没有太大意义。被一些其他包使用。在旧版本的PHP中使用不同的方法,现在只使用random_bytes()

Latest Stable Version Minimum PHP Version Tests Coverage Status License

文档

use axy\random\src\Random;

$string = Random::createString(10); // creates a random string of 10 chars
$bytes = Random::createBytes(100); // creates an array of 100 integers (0-255)