Closed W2YN closed 7 years ago
use SoapBox\Formatter\Formatter; use SoapBox\Formatter\Parsers\ArrayParser;
$xml = '1234444H000011-00032auth error!'; $formatter = Formatter::make($xml, Formatter::ARR); $array = $formatter->toArray(); print_r($array); /////////////////////// output: unserialize(): Error at offset 0 of 199 bytes
laravel 5.1
I solved it.I passed the argument wrong $formatter = Formatter::make($xml, Formatter::XML);
use SoapBox\Formatter\Formatter; use SoapBox\Formatter\Parsers\ArrayParser;
$xml = '1234444 H000011-0003 2 auth error! ';
$formatter = Formatter::make($xml, Formatter::ARR);
$array = $formatter->toArray();
print_r($array);
///////////////////////
output:
unserialize(): Error at offset 0 of 199 bytes