PHP-023 / Beginner
Generating tokens or secrets with rand()/mt_rand()
Why is this a problem?
Predicting seeds and output patterns enables guessing reset tokens and similar values.
How to fix it
php
$token = bin2hex(random_bytes(32)); // Or Str::random(64)