Re: Thousands Separator

From: Date: Fri, 16 Jan 2015 22:50:41 +0000
Subject: Re: Thousands Separator
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-324263@lists.php.net to get a copy of this message
Jennifer wrote: > On Jan 16, 2015, at 11:51 AM, Jim Lucas wrote: >> Could you explain the use of what you're describing/requesting? >> >> And how number_format would not work in its place. > > I'm talking about entering large numbers in the code. If I have a constant, e.g. > $num = '123456789'; > > it would be nice to enter it as: > $num = '123_456_789'; > > just to make it easier to read. As I mentioned, you can do that in Perl. The underscore takes > the place of commas only for readability. It's not a deal breaker, but it sure would be nice! > :) Besides Perl, there are several other languages which allow such "digit separators". Wikipedia has an article about it: <http://en.wikipedia.org/wiki/Integer_literal#Digit_separators>. -- Christoph M. Becker

« previous php.general (#324263) next »