note 39425 added to function.srand

From: Date: Wed, 28 Jan 2004 10:25:12 +0000
Subject: note 39425 added to function.srand
Groups: php.notes 
Request: Send a blank email to php-notes+get-64303@lists.php.net to get a copy of this message
To jesse-at-jgdataworks-dot-com 's issue: You multiply a floatingpoint-number (microtime) with an integer. PHP does an implizit typecast for microtime(). But with 0 <= microtime <= 1 the factor becomes zero. 0 * anything = 0. That's why microtime * rand() = 0 and that's why the md5sum is allways the same. ---- Manual Page -- http://www.php.net/manual/en/function.srand.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39425 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39425&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39425&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64303) next »