Re: [RFC] ZPP Failure On Overflow

From: Date: Mon, 29 Sep 2014 08:29:29 +0000
Subject: Re: [RFC] ZPP Failure On Overflow
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-77694@lists.php.net to get a copy of this message
On 29 Sep 2014, at 02:10, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > Hi! > >> May be this overflow checks should be optional? >> In old ages compilers for Wirth family languages had option to enable or >> disable overflow checks. >> If option is enabled we may throw an exception, if no - work as today. >> Any user would be able to chose between compatibility and safety. > > Given that we have l and L in parameter parsing API, it is essentially > optional, but the choice is on internals developer. I'm not sure having > it as ini value would be the best idea, since behavior-modifying options > in the past proved more trouble than they're worth - one more dimension > one has to test against. This patch preserves the cap-and-not-error behaviour for L, though NaN would continue to error. If there’s a need for it, a new wrap-and-not-error character could be added, basically to match what l currently does. -- Andrea Faulds http://ajf.me/

« previous php.internals (#77694) next »