Weird date_diff alteration of variable output

I have a puzzling behaviour of date_diff which affects
ouput of a float value, on the first ouput. If I output
second time, value is OK.

If I do not use date_diff, all is ok.

<?
$date_row = date_create(“2010-08-14”);
$date_now = date_create();
$dates_diff = date_diff($date_now, $date_row);

$kookoo = 22.07;
$kookoo = intval($kookoo * 100) / 100;
echo “1 $kookoo”; // outputs: 1 F.07 -> why F ???
echo “<br>2 $kookoo”; // ouputs: 2 22.07 -> OK
?>

I am failing to see the connection between the first block of code and the second block with $kookoo in it?

Anyhow, in any operation involving type-juggling (such as intval()) you are best doing a

var_dump( $kookoo);

both before and after the operation and that way it will point to what PHP is understanding that variable to actually contain in terms of type and value, and usually turns up why it is not what you expect.

http://php.net/manual/en/language.types.type-juggling.php
http://www.php.net/manual/en/language.types.integer.php

I use 5.3.0 on win7

Which version of php you are using??

This might be due to the php version. Try it in php5