[PHP-DEV] DateInterval bug

2015-04-12 Thread Peter Lind
Hi, I wanted to get into PHP code development so I grabbed a random bug from bugs.php.net. Which turned out to be https://bugs.php.net/bug.php?id=69378 The problem the bug report describes is that creating a diff between two dates and then subtracting the diff from the later date does not give yo

Re: [PHP-DEV] DateInterval bug

2015-04-12 Thread Lester Caine
On 12/04/15 19:57, Peter Lind wrote: > Is there a good explanation for this behaviour (which applies both to > DateTime::add and DateTime::sub)? I've tried searching the internals list > but couldn't see any discussion of it. It seems like a bug that never got > fixed to the point where there are t

[PHP-DEV] $max > getmaxrand() for rand() call

2015-04-12 Thread Leszek Krupinski
Hello A friend of mine reported something that seemed like a bug (https://bugs.php.net/bug.php?id=69396 ) - to sum up: if you provide $max parameter that is larger than OS-provided getmaxrand(), the result will be artificially stretched, which in result le

Re: [PHP-DEV] $max > getmaxrand() for rand() call

2015-04-12 Thread Stanislav Malyshev
Hi! > ) - to sum up: if you provide > $max parameter that is larger than OS-provided getmaxrand(), the > result will be artificially stretched, which in result leads to some > values not appearing at all. That’s troublesome if for instance some > people use t