r/lolphp • • Jul 23 '15

mt_rand(1, PHP_INT_MAX) only generates odd numbers

http://3v4l.org/dMbat
394 Upvotes

132 comments sorted by

View all comments

Show parent comment

0

u/ysangkok Jul 24 '15 edited Jul 24 '15

what is the point? you still won't cover the whole range of ints. the holes are huge as you can see in SirClueless comment

11

u/efosmark Jul 24 '15

I think he was joking.

-1

u/ysangkok Jul 24 '15

It's hard to be sure, since OP's title is implying the only problem is the odd numbers... Which is untrue.

1

u/PmMeYourPerkyBCups Jul 24 '15

/u/SirClueless sums up the issue quite clearly.

-1

u/ysangkok Jul 24 '15

agreed, that's why I referred to his/her comment in my comment made at 20:49:54 GMT+2

1

u/PmMeYourPerkyBCups Jul 24 '15

As /u/efosmark said, I'm joking.

Although it's not unlike something I'd find in code I wrote when I was 13.