Re: number_format() = "-0.00"

From: Date: Fri, 25 Nov 2016 09:07:55 +0000
Subject: Re: number_format() = "-0.00"
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-97176@lists.php.net to get a copy of this message
Php doesn't have a concept of negative zero except in a string instance. And the main use case for this is displaying the number as a string which has very few real world use cases as being a negative zero. On 25 Nov 2016 9:05 am, "Craig Duncan" <php@duncanc.co.uk> wrote: > On 25 November 2016 at 08:58, Sherif Ramadan <theanomaly.is@gmail.com> > wrote: > > > I'm pretty sure this is covered by the language reference [ > > http://php.net/language.types.float] as per precision of > > floating point > > numbers in PHP. Though I don't see much harm in adding a note with > > references there to the documentation for number_format(), if that's what > > you meant. > > > > Yeh, I'd imagine that's where most people will go looking when they > encounter this issue >

« previous php.internals (#97176) next »