6 ms·
I would not expect it to support ranges larger than 2^32, so why does it? Returning garbage when one of your parameters is beyond a certain limit is "crazy beh
by mikeash 11y ago
I would not expect it to support ranges larger than 2^32, so why does it?
Returning garbage when one of your parameters is beyond a certain limit is "crazy behavior." Either support it properly, or don't support it at all.
- Spivak 11y agoIf we were talking about C this would be called undefined behavior. If you don't satisfy the preconditions before calling a function then the not only is the output invalid but the entire program which uses it is invalid too. I don't think a language like PHP, or indeed anything written in it, should have undefined behavior but I'm not the author of the library.