Skip to content

Add caution note for random function usage#4709

Merged
fabpot merged 1 commit intotwigphp:3.xfrom
xelan:patch-1
Nov 4, 2025
Merged

Add caution note for random function usage#4709
fabpot merged 1 commit intotwigphp:3.xfrom
xelan:patch-1

Conversation

@xelan
Copy link
Copy Markdown
Contributor

@xelan xelan commented Nov 4, 2025

See https://www.php.net/manual/en/function.array-rand.php and https://www.php.net/manual/en/function.mt-rand.php. Users should know that the Twig function is a convenience feature, but unusable e.g. for serious gaming/gambling apps due to the potential predictability and limited value range.

@fabpot
Copy link
Copy Markdown
Contributor

fabpot commented Nov 4, 2025

Thank you @xelan.

@fabpot fabpot merged commit 2996f0b into twigphp:3.x Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants