<?php
$mConnectProfile = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><mc-profile-response><mc-response><code>0</code><message>Service successfully ended</message></mc-response><mc-profile><username>petermueller</username><gender>M</gender><firstname>Muster</firstname><lastname>Peter</lastname><email>peter.muster@info.ch</email><street>Strasse</street><streetnumber>34a</streetnumber><zip>8888</zip><city>Musterhausen</city><country>CH</country><mobilenumber>079 737 37 37</mobilenumber><additional-address>Addresszusatz 888</additional-address></mc-profile></mc-profile-response>');
var_dump((array) $mConnectProfile->{'mc-profile'});
- Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- array(12) {
["username"]=>
string(12) "petermueller"
["gender"]=>
string(1) "M"
["firstname"]=>
string(6) "Muster"
["lastname"]=>
string(5) "Peter"
["email"]=>
string(20) "peter.muster@info.ch"
["street"]=>
string(7) "Strasse"
["streetnumber"]=>
string(3) "34a"
["zip"]=>
string(4) "8888"
["city"]=>
string(12) "Musterhausen"
["country"]=>
string(2) "CH"
["mobilenumber"]=>
string(13) "079 737 37 37"
["additional-address"]=>
string(17) "Addresszusatz 888"
}
preferences:
260.87 ms | 405 KiB | 322 Q