arokettu/random-polyfill
Random Extension Polyfill for PHP
1.99.0
959K downloads/mo
#3193 most downloaded on Packagist
arokettu/php-random-polyfill
What this package is like to depend on
Last release 4 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
2 releases in the last 12 months
see the full history below
Release timeline
18 releases · Jul 2022 to Apr 2026Releases
latest 18-
1.99.001 Sep 2022 -
1.0.613 Apr 2026Release notes
Open source →- 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-Clause BSD
Release notes
Open source →Apr 13, 2026
- 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-Clause BSD
- By the PHP license 3.01 clause 5, updated the upstream license to the PHP License 4.0 (3-Clause BSD)
-
1.0.510 Sep 2025Release notes
Open source →- Removed always included lib.php, now the library has absolutely no side effects in PHP 8.2+
Release notes
Open source →Sep 10, 2025
- Removed always included lib.php, now the library has absolutely no side effects in PHP 8.2+
-
1.0.401 Apr 2025Release notes
Open source →- Upgraded embedded arokettu/unsigned to 1.3.6, a more future-proof version
Release notes
Open source →Apr 1, 2025
- Upgraded embedded arokettu/unsigned to 1.3.6, a more future-proof version
-
1.0.320 Feb 2025Release notes
Open source →- Inline arokettu/unsigned
- Unlock the upper PHP version because the lib will fall back to the native ext-random in 8.2+ anyway
Release notes
Open source →Feb 20, 2025
- Inline arokettu/unsigned
- Unlock the upper PHP version because the lib will fall back to the native ext-random in 8.2+ anyway
-
1.0.207 Sep 2023Release notes
Open source →- Bump arokettu/unsigned to 1.2.1, previous versions may cause invalid results in Mersenne Twister on 32-bit systems.
Release notes
Open source →Sep 7, 2023
- Bump arokettu/unsigned to 1.2.1, previous versions may cause invalid results in Mersenne Twister on 32-bit systems.
-
1.0.111 Nov 2022Release notes
Open source →- Rely on symfony/polyfill-php82 for interface implementations and Random\Engine\Secure (#6),
thanks to @nicolas-grekas - Added compatibility with PHP regression fix: php/php-src#9839 (#5)
- Rely on symfony/polyfill-php82 for interface implementations and Random\Engine\Secure (#6),
-
1.0.026 Oct 2022Release notes
Open source →Since RC1/RC2 are compatible with last 4 release candidates of PHP 8.2 (RC2-RC5),
RC2 is re-released as stable.- No user facing changes since RC2
Release notes
Open source →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.
- No user facing changes since RC2
-
1.0.0-rc201 Oct 2022 pre-release -
1.0.0-rc114 Sep 2022 pre-releaseRelease notes
Open source →Secureengine throwsRandomExceptioninstead ofException- Added verification of the number of elements in serialized data
- Generated data is truncated to 64 bits in
Randomizer::getBytes() - Fixed integer overflow in the upstream math lib
Release notes
Open source →Sep 14, 2022
Secureengine throwsRandomExceptioninstead ofException- Added verification of the number of elements in serialized data
- Generated data is truncated to 64 bits in
Randomizer::getBytes() - Fixed integer overflow in the upstream math lib
-
1.0.0-beta101 Sep 2022 pre-release -
0.5.001 Sep 2022Release notes
Open source →Sep 1, 2022
Hopefully the last alpha
- Exceptions are now compatible in most known cases
- Full coverage
- GMP is now an optional dependency (but highly recommended)
-
0.4.019 Aug 2022Release notes
Open source →Aug 19, 2022
- Verified compatibility with PHP 8.2.0 beta 3
- Tests ported from the PHP engine
- Various compatibility fixes
- Exceptions compatibility (mostly)
-
0.3.005 Aug 2022Release notes
Open source →Aug 5, 2022
- Verified compatibility with PHP 8.2.0 beta 2
PcgOneseq128XslRr64Xoshiro256StarStar- Split
nextInt()andgetInt($min, $max)like in beta 2
-
0.2.131 Jul 2022Release notes
Open source →Jul 31, 2022
- Verified compatibility of custom engines with the current PHP 8.2 master
getInt()now has proper signaturegetInt(int $min, int $max)arrayPickKeys()throws a warning because full compatibility is not achievable. Thanks to [Tim Düsterhus][gh@TimWolla] for the explanation- No warning if the engine is
CryptoSafeEngine
- No warning if the engine is
- Fixed incorrect range function selection (#1), thanks to [Tim Düsterhus][gh@TimWolla]
- Fixed byte selection in range64
-
0.2.027 Jul 2022Release notes
Open source →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)- Serialization and unserialization are now compatible with PHP 8.2 if performed in PHP 7.4+
Mt19937- Serialization and unserialization are now compatible with PHP 8.2 if performed in PHP 7.4+
-
0.1.123 Jul 2022 -
0.1.023 Jul 2022Release notes
Open source →Jul 23, 2022
- First release
- Compatible with PHP 8.2.0 beta 1
- Engines:
- Secure Random
- Mersenne Twister
- Randomizer features:
getInt()getInt($min, $max)