Subversion
Written by: Lorna Jane Mitchell
Featured Refcardz: Top Refcardz:
  1. Git
  2. DNS
  3. Data Mining
  4. Spring Data
  5. Subversion
  1. Spring Data
  2. Subversion
  3. Spring Config.
  4. Spring Annotations
  5. Data Mining

Link Details

Link 810707 thumbnail
User 478055 avatar

By mitchp
via bugs.php.net
Submitted: Jun 22 2012 / 15:08

Rasmus Lerdorf: "Escalate? Oh how I wish I had someone to escalate to. "
  • 2
  • 0
  • 531
  • 135

Comments

Add your comment
User 368023 avatar

yakkoh replied ago:

0 votes Vote down Vote up Reply

Moreover:
For php younger than 5.3.5 the answer to:
php -r 'print number_format("",0) . "\n";'
is NULL and a message:
PHP Warning: number_format() expects parameter 1 to be double, string given in Command line code on line 1

Now I have tried the floatval function, which return 0 on empty string and casting, which also return 0 on empty string.

I suggest that the 'number_format' function uses floatval on a string, for the sake of consistency.

Note1: Python 3+ does not like empty strings and throws an error.

Note2: Perl, the father of PHP, doesn't care.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (2)



Voters Against This Link (0)