SimpleXml不能使用方程式中的值

So there's probably something I've missed something or there's a really simple solution.

My code is as follows:

$nationname = $_GET["nam"];
$nationxml=simplexml_load_file("https://www.nationstates.net/cgi-bin/api.cgi?nation=" . $nationname);  
$environment = (float) $nationxml-> GOVT -> ENVIRONMENT;
$mod = 4;

I get a value from the Xml node ENVIRONMENT. However if I try and use it as follows:

$environment = $environment * $mod;
echo($environment);

Nothing! The 'manipulation'(or whatever you want to call it) doesn't appear to happen. does anybody know a solution?

__

So an XML file could be like this one: https://www.nationstates.net/cgi-bin/api.cgi?nation=southern+ageena, where

  <ENVIRONMENT>15.3</ENVIRONMENT>

so I would expect $environment * $mod to equal 61.2 and thus echo 61.2, But it doesn't