stuckwithcode Posted January 19, 2010 Share Posted January 19, 2010 Hello, what is the limit of mt rand if you specify no limits, Thanks Link to comment https://forums.phpfreaks.com/topic/189026-random-number/ Share on other sites More sharing options...
Buddski Posted January 19, 2010 Share Posted January 19, 2010 This ought to tell you.. mt_getrandmax() Link to comment https://forums.phpfreaks.com/topic/189026-random-number/#findComment-998011 Share on other sites More sharing options...
stuckwithcode Posted January 19, 2010 Author Share Posted January 19, 2010 Where do I put this, at the top of my php page? int mt_getrandmax ( void ) Link to comment https://forums.phpfreaks.com/topic/189026-random-number/#findComment-998022 Share on other sites More sharing options...
Buddski Posted January 19, 2010 Share Posted January 19, 2010 if you just do this somewhere it will tell you the max number echo mt_getrandmax(); Link to comment https://forums.phpfreaks.com/topic/189026-random-number/#findComment-998025 Share on other sites More sharing options...
stuckwithcode Posted January 19, 2010 Author Share Posted January 19, 2010 So this only tells me the maximum number possible and doesn't let me set it. Also will this maximum be the same for everyone or does it change between php versions? Thanks Link to comment https://forums.phpfreaks.com/topic/189026-random-number/#findComment-998032 Share on other sites More sharing options...
Buddski Posted January 19, 2010 Share Posted January 19, 2010 It doesnt let you set it, no. As for the number changing I would presume that it would change per system, but I would be just guessing.. Link to comment https://forums.phpfreaks.com/topic/189026-random-number/#findComment-998036 Share on other sites More sharing options...
stuckwithcode Posted January 19, 2010 Author Share Posted January 19, 2010 Okay Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/189026-random-number/#findComment-998038 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.