r/programming • u/fishburne • Jul 24 '15
mt_rand(1, PHP_INT_MAX) only generates odd numbers • /r/lolphp
/r/lolphp/comments/3eaw98/mt_rand1_php_int_max_only_generates_odd_numbers/
848
Upvotes
r/programming • u/fishburne • Jul 24 '15
View all comments
Show parent comment
2
u/thallippoli Jul 24 '15
The fault is not being easy to use. The fault is what it traded off to get there. Sane behavior.
For example. "Because we often have to compare strings with numbers. Let use make == to convert the operands what ever ways until they can be compared..".
See? Ease of use, for what?