rfc:random_ext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:random_ext [2021/10/07 13:03] – minor fix zeriyoshirfc:random_ext [2021/10/07 13:33] – fix ul zeriyoshi
Line 1: Line 1:
 ====== PHP RFC: Move to RNG functions into ext/random ====== ====== PHP RFC: Move to RNG functions into ext/random ======
-  * Version: 1.0+  * Version: 1.1
   * Date: 2021-09-07   * Date: 2021-09-07
   * Author: Go Kudo <zeriyoshi@gmail.com>   * Author: Go Kudo <zeriyoshi@gmail.com>
Line 43: Line 43:
 These features are provided in a single random.c / php_random.h, and ext/random is always bundled with all builds of PHP, as is ext/standard. These features are provided in a single random.c / php_random.h, and ext/random is always bundled with all builds of PHP, as is ext/standard.
  
-Will cause a BC Break for extensions and php-src downstream projects, Means that the following workaround needs to be done to support PHP 8.and later.+In addition, header files containing the following contents will continue to be provided for extensions and downstream projects that previously depended on ext/standard featuresThese are a transitional measure until the next major version and will be removed in the future.
  
-<code c> +  * standard/php_lcg.h 
-#if PHP_VERSION_ID >= 80200 +  standard/php_rand.h 
-#include "ext/random/php_random.h" +  standard/php_mt_rand.h 
-#else +  standard/php_random.h
-#include "ext/standard/php_lcg.h" +
-#include "ext/standard/php_rand.h" +
-#include "ext/standard/php_mt_rand.h" +
-#include "ext/standard/php_random.h+
-#endif +
-</code> +
- +
-In general, BC Breaks should be avoided and, as we have done in the past, BC Breaks should not occur unnecessarily. +
- +
-However, there is now a need to sort these out in order to deal with other problems with PHP random numbers. I think this could be a good reason to allow this BC Break. +
- +
-See the relevant [[rfc:rng_extension|PHP RFC: Random Extension 3.0]] and Internals ML (or the relevant thread in [[https://externals.io/message/115918|externals]]) for details.+
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
-There are no disruptive changes to userland. However, there will be a BC Break in the downstream project.+none
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
rfc/random_ext.txt · Last modified: 2022/02/08 07:31 by zeriyoshi