Re: Make bcmath functions more strict

From: Date: Thu, 25 Apr 2019 09:35:24 +0000
Subject: Re: Make bcmath functions more strict
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-105441@lists.php.net to get a copy of this message
Hi Vladyslav, I just checked your code snippet, here are my 2 cents: - bcmath should definitely trigger an error when encountering a malformed string like '17 .123', silently converting it to zero is indeed the worth thing to do; - I don't think that there's much value in having it handle exponential notation, you can use userland libraries such as brick/math <https://github.com/brick/math> for this; - I *really* don't think that it should depend on the current locale, like PHP sometimes does with numbers; there has been some discussion just a few months ago to actually stop making float-to-string conversion depend on locale: https://externals.io/message/103638 Ben On Thu, 25 Apr 2019 at 11:02, Vladyslav Startsev < vladyslavstartsev@gmail.com> wrote: > Any other ideas on that one? > > I'll wait for one more week and make RFC then > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#105441) next »