Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105441 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76297 invoked from network); 25 Apr 2019 12:34:46 -0000 Received: from unknown (HELO mail-io1-f50.google.com) (209.85.166.50) by pb1.pair.com with SMTP; 25 Apr 2019 12:34:46 -0000 Received: by mail-io1-f50.google.com with SMTP id r10so14495498ioc.8 for ; Thu, 25 Apr 2019 02:35:37 -0700 (PDT) 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; bh=aRHpQOtWFtk9jB3Fte7nQLx/OeCoBd4fa2uKEBIaiaQ=; b=KS+Ksc6KdoFJNV4ffMZZmRBFrbyf21Jw93P1V8uG1l0axblylyOEBA8ZubviS/naxT 3Gl5XgmNmkzg79IgwthG7Gz05JqtStUVf5KWpJGxMnzSItIyk9z1X2y6NPwUuT4Bvt8w BA8947Cdo2XxlDIeD66g6nRbCYVI4kOazKnAz7v2I24s6GZll9itJ05Og+gxjcRhGTSl 2oiR0PveIrIof0sCRKVUDQ+YFc6zWyVjskRm2Rm96ys86M+Zd5BvZP8vqi5U+v1XwAMs 4roDLGF395pwaQf1iflzl8WED94247ffF4RN8b+qBwiytMjJWFM/T9WnJXw/egnd3fQc PXnQ== 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; bh=aRHpQOtWFtk9jB3Fte7nQLx/OeCoBd4fa2uKEBIaiaQ=; b=Z5QwHmTr1Fe07KkgGZz214UCNplKY4FUOzIHq4y5yTxWZXduH4D+5zpK5pmVj5w1SA uRgWj1BvR2DcQgjpQo0FDELaqTQIQtZ+fw61cq5r9cNIi3Raquk6aMiVtzSEEuAym/zn pSOyircfRIlPEK3/8tetldVP0Kcju3+Bz2GM99vl0iVcb4UT5HDP8bZCulJb8PX3sje4 oHYqbsyDmnmCWUB0+BrPVYIQs4jJGBt/CxDla4l3zDHo7gACv1yyr1SnPh3lfgHrr2qd bh/zPfAQQ5H+grF18ncGgmkciIq0hi5fRP6ZynRRdzvmA0+qVeKNv6MF10h6bjjorfSk ZTzg== X-Gm-Message-State: APjAAAVYCoeGBKdowahOaaptDZMLeRUxtvAhPwTp8ho40B3q9I1HTlIu Ec6lkFfAI2VB0WaX15BUhBeuPxmKrQvVhc4pF8M= X-Google-Smtp-Source: APXvYqzroKDE+Qr5zAulwERLK9CJ0VhQYWS5GQQYwMGIY/++yNis7EXJr+hx7da0UuTnWkvQ3c3EIhD/4R8tz5yuFH0= X-Received: by 2002:a6b:6f07:: with SMTP id k7mr128972ioc.271.1556184937239; Thu, 25 Apr 2019 02:35:37 -0700 (PDT) MIME-Version: 1.0 References: <5c633ed8.1c69fb81.143ab.ad85@mx.google.com> In-Reply-To: Date: Thu, 25 Apr 2019 11:35:24 +0200 Message-ID: To: Vladyslav Startsev Cc: "Legale.legale" , Ben Ramsey , PHP Internals Content-Type: multipart/alternative; boundary="000000000000639adc0587578a16" Subject: Re: [PHP-DEV] Make bcmath functions more strict From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000639adc0587578a16 Content-Type: text/plain; charset="UTF-8" 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 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 > > --000000000000639adc0587578a16--