NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3688 most downloaded on Packagist
Random Extension Polyfill for PHP
Last release 5 months ago
13 Apr 2026
Ships unpredictably
gaps range from 2 weeks to 1.5 years
Nearly every release is documented
notes for 15 of 15 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
18 releases · first in 2022
One column per quarter.
Empty release for PHP >= 8.2
Empty release for PHP >= 8.2
Sep 2, 2022
A special empty version to be installed on PHP >= 8.2.
By the PHP license 3.01 clause 5, updated the upstream license to the PHP License 4.0 (3-Clause BSD) making the library purely licensed under the 3-Cl
Removed always included lib.php, now the library has absolutely no side effects in PHP 8.2+
Sep 10, 2025
Upgraded embedded arokettu/unsigned to 1.3.6, a more future-proof version
Apr 1, 2025
Unlock the upper PHP version because the lib will fall back to the native ext-random in 8.2+ anyway
Feb 20, 2025
Bump arokettu/unsigned to 1.2.1, previous versions may cause invalid results in Mersenne Twister on 32-bit systems.
Sep 7, 2023
Rely on symfony/polyfill-php82 for interface implementations and Random\Engine\Secure ( #6 ), thanks to @nicolas-grekas
Since RC1/RC2 are compatible with last 4 release candidates of PHP 8.2 (RC2-RC5), RC2 is re-released as stable.
Since RC1/RC2 are compatible with last 4 release candidates of PHP 8.2 (RC2-RC5),
RC2 is re-released as stable.
Oct 26, 2022
Since RC1/RC2 are compatible with last 4 release candidates of PHP 8.2 (RC2-RC5), RC2 is re-released as stable.
Speed up 32 bit calculations in 64 bit envs
Secure engine throws RandomException instead of Exception
Secure engine throws RandomException instead of ExceptionRandomizer::getBytes()Fix incompatibility with PHP 8.2.0 RC1
Sep 2, 2022
Exceptions are now compatible in most known cases
Sep 1, 2022
Hopefully the last alpha
Verified compatibility with PHP 8.2.0 beta 3
Aug 19, 2022
Verified compatibility with PHP 8.2.0 beta 2
Aug 5, 2022
PcgOneseq128XslRr64Xoshiro256StarStarnextInt() and getInt($min, $max) like in beta 2Verified compatibility of custom engines with the current PHP 8.2 master
Jul 31, 2022
getInt() now has proper signature getInt(int $min, int $max)arrayPickKeys() throws a warning because full compatibility is not achievable.
Thanks to [Tim Düsterhus][gh@TimWolla] for the explanation
CryptoSafeEngineNOTE: 0.2.0 currently is not fully compatible when using custom engines. This will be fixed in 0.3.0 after PHP 8.2.0 beta 2 is released with some crit
Jul 27, 2022
NOTE: 0.2.0 currently is not fully compatible when using custom engines. This will be fixed in 0.3.0 after PHP 8.2.0 beta 2 is released with some critical fixes.
Randomizer
$enginegetBytes($length)shuffleArray($array)shuffleBytes($bytes)arrayPickKeys($array, $num)Mt19937
Fixed Mt not generating enough data sometimes
Jul 23, 2022
Compatible with PHP 8.2.0 beta 1
Jul 23, 2022
getInt()getInt($min, $max)Your coding agent can read these notes before it upgrades. Set up the MCP server →