phpbar.de logo

Mailinglisten-Archive

[php] type casting

[php] type casting

Adi Sieker adi_(at)_living-source.com
Tue, 09 Nov 1999 15:17:30 GMT


Hi all,

kann mir jemand erklären wieso folgendes nicht funzt.
$wert1 = "4.60";
$wert2 = "4.70";
settype($wert1, "double");
settype($wert2, "double");
$wert3 = $wert2 + $wert1;
echo $wert3;

resultat = 8

Beide variablen sind doch doubles, also sollte doch keine type
conversion passieren.

Tschau
   Adi
./e2fsck: Illegal triply indirect block found while reading bad blocks
          inode. This doesn't bode well, but we'll try to go on...
~
adi_(at)_living-source.com               tel:+761 / 15 25 8-13
http://www.living-source.com        fax:+761 / 15 25 8-50


php::bar PHP Wiki   -   Listenarchive