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

2016-08-09 Thread Christoph M. Becker
On 09.08.2016 at 00:12, Davey Shafik wrote: > I would _very_ much prefer to keep this BC. If we do the right thing, and > there are no repercussions, I'd actually remove the warning. Well, there is already . > If you think > we might want to disallow this in the

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

2016-08-08 Thread David Rodrigues
What is the sense to use min > max, in general? It should 'flip' arguments automatically in this case? 2016-08-08 18:36 GMT-03:00 Leigh : > Hi all, > > There has been an unforeseen break with rand() when the minimum value is > greater than the maximum. > > Prior to 7.1 rand()

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

2016-08-08 Thread Davey Shafik
Leigh, I would _very_ much prefer to keep this BC. If we do the right thing, and there are no repercussions, I'd actually remove the warning. If you think we might want to disallow this in the future, use an E_DEPRECATED, but a warning seems pointless unless it's doing the wrong thing, or it's

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

2016-08-08 Thread Leigh
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 preemptively committed a fix to