<?php
function object_to_array($data)
{
if (is_array($data) || is_object($data)) {
$result = [];
foreach ($data as $key => $value) {
$result[$key] = object_to_array($value);
}
return $result;
}
return $data;
}
$client = new SoapClient("lk-test.cse.ru/1c/ws/web1c.1cws?wsdl", array('login' => "test",
'password' => "2016"));
$response = $client->Calc();
$responseArray = object_to_array($response);
var_dump($responseArray );
?>
function object_to_array($data)
{
if (is_array($data) || is_object($data)) {
$result = [];
foreach ($data as $key => $value) {
$result[$key] = object_to_array($value);
}
return $result;
}
return $data;
}