note 59750 deleted from function.trim by hholzgra

From: Date: Thu, 02 Aug 2012 12:23:39 +0000
Subject: note 59750 deleted from function.trim by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189644@lists.php.net to get a copy of this message
Note Submitter: Martin Kealey ---- Using "trim" to minimize the format of a decimal number strikes me as awkward. I would just use: $str += 0; This even has the added benefit of ensuring that you have at least one digit (and thus have a valid number) even if the original was empty.

« previous php.notes (#189644) next »