From af520ccb5074bc5afeb73a745cbbcbd4fec2fca1 Mon Sep 17 00:00:00 2001 From: Zak Greant Date: Mon, 15 Oct 2001 22:51:36 +0000 Subject: [PATCH] Minor fix to the *srand make_seed() function git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@60012 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/math.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/math.xml b/functions/math.xml index 7b978d4937..fd3f76c365 100644 --- a/functions/math.xml +++ b/functions/math.xml @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -796,8 +796,8 @@ var_dump(hexdec("a0")); // seed with microseconds function make_seed() { - list($usec,$sec) = explode(" ", microtime()); - return ((float)$sec+(float)$usec) * 100000; + list($usec, $sec) = explode(' ', microtime()); + return (float) $sec + ((float) $usec * 100000); } mt_srand(make_seed()); $randval = mt_rand(); @@ -1229,8 +1229,8 @@ $foo = round(1241757, -3); // $foo == 1242000 // seed with microseconds function make_seed() { - list($usec,$sec) = explode(" ", microtime()); - return ((float)$sec+(float)$usec) * 100000; + list($usec, $sec) = explode(' ', microtime()); + return (float) $sec + ((float) $usec * 100000); } srand(make_seed()); $randval = rand();