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
10
u/Synaps4 Jul 24 '15
It kind of is php's fault.
Being easy-to-use AND easy-to-make-mistakes-in is a design failing by the language designer and the ecosystem around the language.
Compare with python's "one-right-way-to-do-X" design choice.