Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105458 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40119 invoked from network); 26 Apr 2019 14:37:23 -0000 Received: from unknown (HELO mail-it1-f178.google.com) (209.85.166.178) by pb1.pair.com with SMTP; 26 Apr 2019 14:37:23 -0000 Received: by mail-it1-f178.google.com with SMTP id u65so5268647itc.2 for ; Fri, 26 Apr 2019 04:38:31 -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=Z5LbHQat/GdQd1e0Y99WDwv+Jc1KqqLcse4vKHvFTWA=; b=t+PUT9jnhHLDUPrQOxTVN9JAp1LNcRM+kBeTsMAc0Tr1Mnt9nGJeS38FHevV83BNs+ FK/J9qX7U2Ql5W+ZzUlwdUlbcPu7JuaQyq7rt/SdUi5ZvO7jtmBMNpB5EJIcEDwOJLAg Wxl2o9SgGBCW8Iv2H5Ub+tqhPQamfGUQo0zXDP/OfrFjI6hJ4y7pNED2Q2jZpuq4dmRq zYBPsONs6OTsOdBASrgH88Z41XS/cgg/USlLixg4zMnaLc3O6DczlUdz28IOWeQt0wCZ A+rBBcaBPfCCsk64TuADgvz+pzIgu7uVgKcEuJhu72uxGDissya5/ozB8Vul+fezcEiX oqCg== 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=Z5LbHQat/GdQd1e0Y99WDwv+Jc1KqqLcse4vKHvFTWA=; b=uPGyMhLIkVhP8vRxPVmC3u0VZgU1eGTKGOQpy7uZR3jwxJaTnxzElw7Cfdpm63rBN+ SH8iZ4k27vdOYf4HXb1XSFcrFyAhFRgfgSKYy4bGLmp2qWZ8sn1kzbpZKzYaMFq1EW3+ dkPw6PfDXNQ7WfgFNTu0wp5WquqSk77XlPApEy59/4lHLTfvVQQEyiZZIqrf/Vvcwyqs vh7N1PQb7saBAMjM/DPLzBIwhGAraXyOh60zvwXw2E+0Lwbg2d8GqQy3mrm4fMSxRDpX 0fIm03ATteK99FGy0NvLjK8y8buTNEGdoIPCcpkFYk3VIFwuMFRHUy7Q6fXo7YopJ3Wa xLGg== X-Gm-Message-State: APjAAAW8PrCq7JSKXyE0KbPz8i2RhCvdm4DoE8ascddCn9Leb1jOGbSU rP4k+5dLLSFct6ilDnlQmwiO5TYCnr4iAEkgzjY= X-Google-Smtp-Source: APXvYqx2GfZaA/RRnU3XAm6zwbHABnOvdNNvs8ABqsm/So6UC9i2GOjiHVA5iWREZEPTPszSHJaMaJGCT6lJ+gJl3jU= X-Received: by 2002:a24:4682:: with SMTP id j124mr8101595itb.90.1556278710734; Fri, 26 Apr 2019 04:38:30 -0700 (PDT) MIME-Version: 1.0 References: <5c633ed8.1c69fb81.143ab.ad85@mx.google.com> <6a97cecf-7a5d-6476-7773-fdd41aa45646@gmx.de> In-Reply-To: <6a97cecf-7a5d-6476-7773-fdd41aa45646@gmx.de> Date: Fri, 26 Apr 2019 13:38:17 +0200 Message-ID: To: "Christoph M. Becker" Cc: Vladyslav Startsev , "Legale.legale" , Ben Ramsey , PHP Internals Content-Type: multipart/alternative; boundary="000000000000b9943205876d5fad" Subject: Re: [PHP-DEV] Make bcmath functions more strict From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000b9943205876d5fad Content-Type: text/plain; charset="UTF-8" > 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. That would be nice, but I the meantime though (PHP 7.4?) we could just add a warning when the number is malformed and zero is returned for this reason. At least this warning can be logged, or caught by an error handler to convert it to an exception in userland. - Ben --000000000000b9943205876d5fad--