RE: [PHP] Unexpected values in an associative array
| From: | Richard Lynch | Date: | Wed, 08 Aug 2007 04:28:11 +0000 |
| Subject: | RE: [PHP] Unexpected values in an associative array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260415@lists.php.net to get a copy of this message | ||
On Tue, July 31, 2007 11:06 am, Instruct ICC wrote:
> What is $value and what is this supposed to do:
>> case 'integer':
>> $value += 0;
>>
This is a silly hack in place of:
$value = (int) $value;
break;
>>
>> case 'float':
>> $value += 0.0;
$value = (float) $value;
Adding 0 won't hurt an int, but adding 0.0 can only increase the error
margin of float.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?