PHP Error, is it resolvable, or a language bug?
- by rls
Given the following code
$c= new SoapClient('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL');
$usa = "USD";
$eng = "GBP";
doing a __getTypes on the client gives me
Array ( [0] => struct ConversionRate { Currency FromCurrency; Currency ToCurrency; } [1] => string Currency [2] => struct ConversionRateResponse { double ConversionRateResult; } )
if i then do
$calculation = $c->ConversionRate($usa, $eng);
and print calculation i get an error about
Catchable fatal error: Object of class stdClass could not be converted to string
Is there a specific way i should be printing this out, or i it a bug, from researching / googling many people seem to have a problem but i cant find a suitbale solution, other than downgrading php, which isnt a solution for me as i am doing this as homework and its running off of a college server