Joke Collection Website - Public benefit messages - How does php use random function rand () to generate a digital verification code?

How does php use random function rand () to generate a digital verification code?

refer to this

$code= "";

// canvas

$ image = imagecreate true color (8,25);

imagefill($image, , , imagecolorallocate($image, 255, 255, 255));

for($i=; $i< 4; $i++){

$rand_color=imagecolorallocate($image, rand(,155), rand(,155), rand(,155));

$code_tmp=dechex(rand(1,15));

$code.=$code_tmp;

imagestring($image, rand(4,5), rand($i*2,$i*2+2-6), rand(,13),$code_tmp , $rand_color);

// interference line

image line ($ image, rand ($ I * 2, $ I * 2+2), rand (,25), rand ($ I * 2, $ I * 2+2), rand (,25).

imageline($image, rand($i*2,$i*2+2), rand(,25), rand($i*2,$i*2+2), rand(,25), $rand_color);

}

// Save

session_start ();

$_SESSION['yzm']=$code;

session_write_close();

header("content-type:image/png");

imagepng($image);

imagedestroy($image);