go to bug id or search bugs for
From manual page: http://www.php.net/function.stats-rand-gen-int
stats_rand_gen_int has changed to stats_rand_ignlgi
Add a Patch
Add a Pull Request
It appears this was always the case, and that the prototype was wrong in the source code for the stats_rand_ignlgi function for about 10 years.
The stats documentation was probably generated via a tool that read source prototypes (our tools used to use prototypes long ago when generating doc skeletons, but now we have doc-base/scripts/docgen/ uses Reflection data instead).
Here is the bug report that reported the incorrect prototype:
name mismatches in statistics.c (September 11, 2007)
And the patch that fixed this prototype and many others in the stats extension:
Fixed inconsistent prototype declarations (May 24, 2016)
While Bug #57832 requested stats_rand_ignlgi() be renamed to stats_rand_gen_int() to match the prototype, that is not what happened, probably because the fix was ~8.5 years later and didn't want to break backwards compatibility by renaming a bunch of functions.
Because commit 900275fb3f84cca3dac574182e9f185602a42c53 changed many prototypes, the odds are high that many other stats functions are incorrectly documented and not only stats_rand_ignlgi(). For this reason this bug report is being hijacked to compare and fix all stats functions here:
There are several tools in doc-base/ that could help this cause, and if one does not exist for this then it probably should. It might compare the source code, PHP documentation, and the extensions Reflection data, and make sure all three are the same. Sorry for digressing but this was fun to research :)
With all that said, if someone decides to only change stats_rand_gen_int() to stats_rand_ignlgi() in the docs then that's okay, please report the fix here but leave the bug report open until all of stats is evaluated.
Same problem with function "stats_rand_gen_ibinomial" that was renamed to "stats_rand_ibinomial".