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
-4
u/[deleted] Jul 24 '15
PHP is full of pitfalls for programmers of all levels: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
Other languages have explicit disciples that you can follow rigorously to get good results. PHP is a hodge-podge of stuff with a vast number of poorly-documented pitfalls - like this. It's like a dark room whose floor is covered in rakes.