note 60564 deleted from function.number-format by levim

From: Date: Sun, 23 Mar 2014 14:15:45 +0000
Subject: note 60564 deleted from function.number-format by levim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-199026@lists.php.net to get a copy of this message
Note Submitter: YumYum ---- Jarrat's example below has a problem. If the number is negative, the sign is dropped. It always returns positive numbers. The problem seems to be in the float cast in: return (float) $number[0].'.'.$decimal; I have not had a problem in PHP5 with: return $number[0].'.'.$decimal;

« previous php.notes (#199026) next »