> On 25 Sep 2014, at 02:17, Stas Malyshev <smalys...@sugarcrm.com> wrote: > > Hi! > >> So, the problem comes with built-in functions, which have some side >> effect, which can be usefully run with a bogus value for an integer >> argument. In contrast, any function which has some side effect which is >> actively harmful given a bogus value would be a beneficiary of the change. > > No bogus value ever gets to a function - it always gets INT_MAX on > overflow. If INT_MAX is harmful for this function, this change does not > help as you could still pass INT_MAX and this change would not do anything. > > The thing is relying on this would not really improve your code - it is > very rare that INT_MAX+1 is harmful for your function but INT_MAX-1 is > not. But it may be useful to know that you can pass any value and it > will be capped at INT_MAX.
No it won't. Normally it truncates (module), only some functions cap. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php