> On Feb 7, 2019, at 11:47, Vladyslav Startsev <vladyslavstart...@gmail.com> 
> 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 twitter about this
> (https://twitter.com/SaraMG/status/1087902930110480384). So to
> conclude things that I want, is drop behavior (they should throw
> invalid argument exception) that I've showed in the first link and as
> Sara suggested add deprecation warning (but I think it should be
> E_NOTICE level errors) in 7.4.


Another option to consider is to adopt the same approach as standard
math in PHP. Here’s an example using standard addition for the same
values: https://3v4l.org/iMGg8

So, maybe it should emit notices and warnings instead?

    Notice: A non well formed numeric value encountered in…
    Warning: A non-numeric value encountered in…

Cheers,
Ben

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to