note 32768 deleted from language.types.string by colder
| From: | colder@php.net | Date: | Tue, 17 Oct 2006 18:00:50 +0000 |
| Subject: | note 32768 deleted from language.types.string by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118634@lists.php.net to get a copy of this message | ||
Note Submitter: edwin at se-technology dot com
----
This one took me a while to sort out:
$foo = "1.5\n";
$bar = "1.5";
printf ("%6.2f, %6.2f ", $foo*2, $bar*2);
>> 2.0, 3.0
So apparently string conversion is messed up by NULL, an obvious solution in case you happen to have
a NULL terminated string is:
$foo = rtrim ($foo);