while using simple xml and get double or float int value from xml object for using math operations (+ * - / ) some errors happens on the operation, this is because of simple xml returns everythings to objects.
exmple;
<?php
$name = "somestring";
$size = 11.45;
$xml = '
<xml>
<name>somestring</name>
<size>11.45</size>
</xml>';
$xmlget = simplexml_load_string($xml)
echo $xml->size*2; // 20 its false
// ($xml->size is an object (int)11 and (45) )
// this is true
echo $size*2; // 22.90
echo (float)$size*2; // 22.90
?>