Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104372 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77450 invoked from network); 12 Feb 2019 22:38:28 -0000 Received: from unknown (HELO mail-qk1-f177.google.com) (209.85.222.177) by pb1.pair.com with SMTP; 12 Feb 2019 22:38:28 -0000 Received: by mail-qk1-f177.google.com with SMTP id o125so9428265qkf.3 for ; Tue, 12 Feb 2019 11:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=q4ALpWd19Tkod3nMCR67WFd4LolnylprozHTlHQ8azA=; b=solBAL7ONsryj9OXFCicaZl/hiUA7LpIw3wvHs/Cm0tEQbkEDRtw6Evrq8jT59i+1X eMn0VH1rPNwE9/0lMtk9yrPtYgK6BDKfWA9+BBlgn8g27kUuevfjVipqma9hb5ULm4R/ L9ATtz3PXJ4b6uXkrR8PCYeQ3x9R4OU/YBsdRS8bYN2AKT/PbMdD4ARUypfzQ6F/+fPd WRbI3de3rbvTOCnhZ+qjbLSPGsUa9UKcWyGZHEYjchvgZZJIrELQ/cmy1p2JRAy19ya9 8vwgn0hOH2zbxQFz28I9MVXHzStOXhnW32idJfwMJM3JbvOjTds9HPl396AHr3k/Spu0 KwYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=q4ALpWd19Tkod3nMCR67WFd4LolnylprozHTlHQ8azA=; b=JqSKq92cLgKB/dle+wijBK6iUaj8+uP8HrIHXPKQXzbt76A0I8c1KShIubehFJlEpK EFrPm5st1VHYm0hPe9agzyEyXGWK+ONpBVeLcfs0A5rGDz1TRm+92ntjnQe3pZS2VJTU B2x3l2NX1eWMH+SoeyHSJ8NkOzdrGbhpDWSX9bPPN4V1LYInHHsFrSqmfTUS78d6UaXq URy7sx/cktjUxnfjbQawU4fIAnW34PukYS7bBD8kE9S2SR15ao78ASlns+3oy9IM2Dzr dsUvPP3YNAEQH4tgBtSDs8x3nuvpSCnK0AGtmZcXCLYWJ3JwAPxKhBzQeDbdcWCdJ1qA wfQQ== X-Gm-Message-State: AHQUAua11jHiFaWNxOAj+HhYkYAw98PaNZGBtFtJQ6g4FVP8gVZ0EXsl 1ws0trkI/F/jSW+jqgC6l3FBMd7uF3pc9xMgtdkBWEM= X-Google-Smtp-Source: AHgI3IZpVQaSyRjbrdl2MRLW/ir5x+GqjroKrwILKBAlQc0SCLI14CJy692+Qlmtl62PtTC6GLrL6/lBFjIbQa4xwpY= X-Received: by 2002:ae9:dd84:: with SMTP id r126mr3801079qkf.217.1549999285250; Tue, 12 Feb 2019 11:21:25 -0800 (PST) MIME-Version: 1.0 References: <55E49E9F-9E09-4AA2-ACC3-C0FF3FE7EF09@benramsey.com> In-Reply-To: <55E49E9F-9E09-4AA2-ACC3-C0FF3FE7EF09@benramsey.com> Date: Tue, 12 Feb 2019 21:21:14 +0200 Message-ID: To: Ben Ramsey Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Make bcmath functions more strict From: vladyslavstartsev@gmail.com (Vladyslav Startsev) 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 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=E2=80=99s an example using standard addition for the sa= me > values: https://3v4l.org/iMGg8 > > So, maybe it should emit notices and warnings instead? > > Notice: A non well formed numeric value encountered in=E2=80=A6 > Warning: A non-numeric value encountered in=E2=80=A6 > > Cheers, > Ben Ha! I like your idea Ben. Should I make RFC? Since no one else responded