[PHP-DEV] Re: BC break with rand() where min > max

2016-08-10 Thread Leigh
On Wed, 10 Aug 2016 at 14:19 Tom Worster wrote: > Your fix seems fine for rand() but less so for mt_rand(). > > Applying this fix will break much less mt_rand()-using code than not > applying it will break rand()-using code. From that point of view, > applying it is the better choice. > > Otoh, i

[PHP-DEV] Re: BC break with rand() where min > max

2016-08-10 Thread Tom Worster
On 8/8/16 5:36 PM, Leigh wrote: Hi all, There has been an unforeseen break with rand() when the minimum value is greater than the maximum. Prior to 7.1 rand() would happily accept backwards parameters and return a value, however in the 7.1 branch it now emits a warning and returns false. I've