Posted by Michael Fesser on 06/24/07 16:50
..oO(yawnmoth)
>According to php.net, mt_rand() and rand()'s$max value is, by default,
>RAND_MAX. This suggests to me that RAND_MAX is a constant, however,
>the following PHP script shows this not to be the case:
>
><?php
>echo defined('RAND_MAX') ? 'defined' : 'not defined';
>?>
>
>Any ideas as to why this is?
Just because something is written in caps in the manual doesn't
necessarily mean that it's a PHP constant. It could also be a system-
dependent constant in the C source code.
Micha
[Back to original message]
|