rand() broken on dev version?
| From: | Rusty Wright | Date: | Wed, 11 Dec 2002 20:07:51 +0000 |
| Subject: | rand() broken on dev version? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-92366@lists.php.net to get a copy of this message | ||
php version: php4-STABLE-200212101230
apache: 2.0.43
os/platform: solaris 9/sparc
compiler: gcc 3.2
I ran configure with
./configure \
--prefix=${ROOT} \
--with-apxs2=/${ROOT}/bin/apxs \
--with-config-file-path=${ROOT}/conf \
--with-openssl=/usr/local \
--with-xml \
--enable-wddx \
--enable-track-vars \
--enable-trans-sid \
--enable-inline-optimization \
--disable-posix-threads \
--with-mysql=${MYSQLROOT} \
--with-pdflib \
--with-jpeg-dir \
--with-tiff-dir \
--enable-libgcc
The following code spits out 5, 36 times:
for ($i = 0; $i < 36; $i++) {
$xrand = rand(5, 15);
echo "$xrand <br>";
}
If I take out the args to rand() then it spits out random numbers
between 0 and whatever (presumably what getrandmax() returns).