Skip to content

docs: str_shuffle() also continues the seeded PRNG sequence in worker mode - #2825

Merged
dunglas merged 1 commit into
php:mainfrom
sucloudflare:docs/worker-str-shuffle
Nov 8, 2026
Merged

dunglas merged 1 commit into
php:mainfrom
sucloudflare:docs/worker-str-shuffle

Conversation

@sucloudflare

Copy link
Copy Markdown
Contributor

str_shuffle() consumes the same global MT19937 state as mt_rand()/shuffle()/array_rand() (same RANDOM_G(mt19937_seeded) flag in ext/random), so it's affected the same way by the cross-request persistence described in this section, but wasn't listed.

@dunglas
dunglas merged commit cf4945c into php:main Nov 8, 2026
10 of 11 checks passed
@dunglas

dunglas commented Nov 8, 2026

Copy link
Copy Markdown
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants