PackageTrack
Sign in Get early access

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 2026
2023 2024 2025 2026
Release Pre-release

Releases

latest 18
  1. 1.99.0 01 Sep 2022
    Release notes

    Empty release for PHP >= 8.2

    Open source →
    Release notes

    Sep 2, 2022

    A special empty version to be installed on PHP >= 8.2.

    1.x

    Open source →
  2. 1.0.6 13 Apr 2026
    Release notes
    • 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
    Open source →
    Release notes

    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
    Open source →
  3. 1.0.5 10 Sep 2025
    Release notes
    • Removed always included lib.php, now the library has absolutely no side effects in PHP 8.2+
    Open source →
    Release notes

    Sep 10, 2025

    • Removed always included lib.php, now the library has absolutely no side effects in PHP 8.2+
    Open source →
  4. 1.0.4 01 Apr 2025
    Release notes
    • Upgraded embedded arokettu/unsigned to 1.3.6, a more future-proof version
    Open source →
    Release notes

    Apr 1, 2025

    • Upgraded embedded arokettu/unsigned to 1.3.6, a more future-proof version
    Open source →
  5. 1.0.3 20 Feb 2025
    Release notes
    • Inline arokettu/unsigned
    • Unlock the upper PHP version because the lib will fall back to the native ext-random in 8.2+ anyway
    Open source →
    Release notes

    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
    Open source →
  6. 1.0.2 07 Sep 2023
    Release notes
    • Bump arokettu/unsigned to 1.2.1, previous versions may cause invalid results in Mersenne Twister on 32-bit systems.
    Open source →
    Release notes

    Sep 7, 2023

    • Bump arokettu/unsigned to 1.2.1, previous versions may cause invalid results in Mersenne Twister on 32-bit systems.
    Open source →
  7. 1.0.1 11 Nov 2022
    Release notes
    • 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)
    Open source →
    Release notes

    Nov 12, 2022

    • Rely on symfony/polyfill-php82 for interface implementations and Random\Engine\Secure (#6), thanks to [Nicolas Grekas][gh@nicolas-grekas]
    • Added compatibility with PHP regression fix: PHP#9839 (#5)
    Open source →
  8. 1.0.0 26 Oct 2022
    Release notes

    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
    Open source →
    Release notes

    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
    Open source →
  9. 1.0.0-rc2 01 Oct 2022 pre-release
    Release notes
    • Speed up 32 bit calculations in 64 bit envs
    Open source →
    Release notes

    Oct 1, 2022

    • Speed up 32 bit calculations in 64 bit envs
    Open source →
  10. 1.0.0-rc1 14 Sep 2022 pre-release
    Release notes
    • Secure engine throws RandomException instead of Exception
    • 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
    Open source →
    Release notes

    Sep 14, 2022

    • Secure engine throws RandomException instead of Exception
    • 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
    Open source →
  11. 1.0.0-beta1 01 Sep 2022 pre-release
    Release notes

    Sep 2, 2022

    • Fix incompatibility with PHP 8.2.0 RC1

    0.x

    Open source →
  12. 0.5.0 01 Sep 2022
    Release notes

    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)
    Open source →
  13. 0.4.0 19 Aug 2022
    Release notes

    Aug 19, 2022

    • Verified compatibility with PHP 8.2.0 beta 3
    • Tests ported from the PHP engine
    • Various compatibility fixes
    • Exceptions compatibility (mostly)
    Open source →
  14. 0.3.0 05 Aug 2022
    Release notes

    Aug 5, 2022

    • Verified compatibility with PHP 8.2.0 beta 2
    • PcgOneseq128XslRr64
    • Xoshiro256StarStar
    • Split nextInt() and getInt($min, $max) like in beta 2
    Open source →
  15. 0.2.1 31 Jul 2022
    Release notes

    Jul 31, 2022

    • Verified compatibility of custom engines with the current PHP 8.2 master
    • 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
      • No warning if the engine is CryptoSafeEngine
    • Fixed incorrect range function selection (#1), thanks to [Tim Düsterhus][gh@TimWolla]
    • Fixed byte selection in range64
    Open source →
  16. 0.2.0 27 Jul 2022
    Release notes

    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
      • $engine
      • getBytes($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+
    Open source →
  17. 0.1.1 23 Jul 2022
    Release notes

    Jul 23, 2022

    • Fixed Mt not generating enough data sometimes
    Open source →
  18. 0.1.0 23 Jul 2022
    Release notes

    Jul 23, 2022

    • First release
    • Compatible with PHP 8.2.0 beta 1
    • Engines:
      • Secure Random
      • Mersenne Twister
    • Randomizer features:
      • getInt()
      • getInt($min, $max)
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive