Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98831 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6458 invoked from network); 20 Apr 2017 21:12:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2017 21:12:28 -0000 Authentication-Results: pb1.pair.com header.from=patrickallaert@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.45 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.218.45 mail-oi0-f45.google.com Received: from [209.85.218.45] ([209.85.218.45:33041] helo=mail-oi0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/E7-61625-B3429F85 for ; Thu, 20 Apr 2017 17:12:28 -0400 Received: by mail-oi0-f45.google.com with SMTP id y11so36302931oie.0 for ; Thu, 20 Apr 2017 14:12:27 -0700 (PDT) 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; bh=SbteGuIgofMnamBYUuhA145tbObP1NU+IF++zkLImbo=; b=rJJja0AuVVyMxrW512jeom0gncMUxuXu+YbX4OqUgBtRROEXbM4MwUmszUP6JLBtlV gHf8KZC4z8K5PxFohFF220276uzP9eDXWf4McatHs6Wy3uMBQcBGQcbEL0q2yWXNhTiY EEEt41NMo8DibF4jm4DXBLGXv1DbPTUNlTHjYwD2PHthETNp69p1jScZDvDNZe+kh7gk M4/jys47t261Cv2gLEgeOtsDB5Jp2oke9AMXREOuqJE7DllD3c19xB0d0RR9g8Vpfuaq MADajmQPmq+fwFqkqNAdodW38iRGpUzgGrvpDpk34xxfoIdJpIBg5IWm2AX0z4Q7tkIn KRBg== X-Gm-Message-State: AN3rC/7zGiGFj7YROueLypzwlg5c9OR2q/ln0jECXy3zEaBCORcowz+1 7KzAdx2qkaBAKClFFZkjd/hkf+NIezx9 X-Received: by 10.157.10.46 with SMTP id 43mr6009549otg.276.1492722744740; Thu, 20 Apr 2017 14:12:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 20 Apr 2017 21:12:13 +0000 Message-ID: To: Craig Duncan , Internals Content-Type: multipart/alternative; boundary=001a113b007af2cee8054d9f980f Subject: Re: [PHP-DEV] [RFC] [VOTE] Prevent number_format() from returning negative zero From: patrickallaert@php.net (Patrick ALLAERT) --001a113b007af2cee8054d9f980f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le mer. 19 avr. 2017 =C3=A0 19:19, Craig Duncan a =C3= =A9crit : > Hi everyone, > > The RFC for making *number_format()* consistent when dealing with negativ= e > zero is now in the voting phase. > > Voting will be open for 2 weeks and will close at 0:00 UTC on Wednesday 3= rd > May. > > https://wiki.php.net/rfc/number_format_negative_zero > > Thanks, > Craig > Hi, I voted "no", because I think it's more important to avoid possible backward incompatibilities than fixing something which is hard to determine whether it is a bug or not. I'm personally very ok with: php > echo number_format(-1e-5); -0 What is non consistent to me is this: php > echo number_format(-0e-5); 0 php > echo -0e-5; -0 Since -0e-5 is a negatively signed 0, number_format(-0e-5) should return "-0" as well. Cheers, Patrick --001a113b007af2cee8054d9f980f--