axy/random
生成伪随机数
0.2.1
2023-03-16 14:51 UTC
Requires
- php: >=8.1
- axy/binary: ~0.2.0
Requires (Dev)
- phpunit/phpunit: ~10.0.15
- squizlabs/php_codesniffer: =3.7.1
This package is auto-updated.
Last update: 2024-09-16 17:49:45 UTC
README
PHP中的随机序列生成。目前这个包没有太大意义。被一些其他包使用。在旧版本的PHP中使用不同的方法,现在只使用random_bytes()。
文档
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)