On Fri, Apr 26, 2019 at 3:10 PM Benjamin Morel
wrote:
> > Yes, PHP 8 for BCs and PHP 7.4 for warnings that's what I was trying to
> said
>
> FWIW, I don't think anyone will complain about adding a warning to
> something that's obviously a bug when it fails.
> I'd say go ahead a write an RFC. If y
> Yes, PHP 8 for BCs and PHP 7.4 for warnings that's what I was trying to
said
FWIW, I don't think anyone will complain about adding a warning to
something that's obviously a bug when it fails.
I'd say go ahead a write an RFC. If you want to have more chances for it to
pass though, I would not cha
> Another option might be to introduce an object-oriented layer on top of
> libbcmath
I think it should be a separate discussion for this. Create new
discussion so we can talk there.
>> Throwing an exception would be rather uncommon for functions, and would
>> definitely have to wait for PHP 8 f
> Throwing an exception would be rather uncommon for functions, and would
> definitely have to wait for PHP 8 for BC reasons.
Sure. This is actually a discussion I'd like to start for all PHP functions
in PHP 8.
>Another option might
> be to introduce an object-oriented layer on top of libbcmath.
On 26.04.2019 at 09:45, Benjamin Morel wrote:
>> I don't really understand it, I must be strict, converting to zero
>> will lead to wrong calculations.
>
> That's what I said :) Fully agree here, any non-numeric string should throw
> an exception.
>
> In summary, I would check that the string matc
Hi Vladyslav,
> I don't really understand it, I must be strict, converting to zero
> will lead to wrong calculations.
That's what I said :) Fully agree here, any non-numeric string should throw
an exception.
In summary, I would check that the string matches `
/^[\+\-]?[0-9]+(\.[0-9]+)?$/`or else
On Thu, Apr 25, 2019 at 12:35 PM Benjamin Morel
wrote:
>
> 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
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 exponen
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
Hello Vlad, internals.
If you'll make an RFC someone will certainly vote :-)
Meanwhile till php bureaucracy hasn't put quorum rule in the voting process
you have a chance to push it through.
Good luck.
On Fri, Feb 8, 2019 at 1:07 AM Ben Ramsey wrote:
>
> > On Feb 7, 2019, at 11:47, Vladyslav Startsev
> > wrote:
> >
> > Hello everyone!
> >
> > Recently I noticed that there are strange behavior going on if I use
> > bcmath functions (some examples you can see here
> > https://3v4l.org/D3s7J). I
> On Feb 7, 2019, at 11:47, Vladyslav Startsev
> wrote:
>
> Hello everyone!
>
> Recently I noticed that there are strange behavior going on if I use
> bcmath functions (some examples you can see here
> https://3v4l.org/D3s7J). I also previously had little discussion with
> Sara Golemon on twitt
Hello everyone!
Recently I noticed that there are strange behavior going on if I use
bcmath functions (some examples you can see here
https://3v4l.org/D3s7J). I also previously had little discussion with
Sara Golemon on twitter about this
(https://twitter.com/SaraMG/status/1087902930110480384). So
13 matches
Mail list logo