note 108800 deleted from function.rand by danbrown

From: Date: Fri, 25 May 2012 15:21:25 +0000
Subject: note 108800 deleted from function.rand by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-188232@lists.php.net to get a copy of this message
Note Submitter: anonymous coward ---- @Alex Khimch Random seems pretty random. Your image test is flawed. Try this to see some noise: <?php header("Content-type: image/png"); $img = imagecreatetruecolor(500,500); $ink = imagecolorallocate($img, 0xAA, 0xAA, 0xAA); imagefill($img, 0, 0, imagecolorallocate($img, 0x8F, 0x0D, 0x57)); for($i=0;$i<500;$i++) { for($j=0;$j<500;$j++) { imagesetpixel($img, rand(1,500), rand(1,500), $ink1); } } imagepng($img); imagedestroy($img);

« previous php.notes (#188232) next »