Как преобразовать SimpleXMLObject в PHP массив и строки? - PullRequest
0 голосов
/ 10 октября 2019

Рассмотрим следующий код:

Array
(
    [@attributes] => Array
        (
            [Type] => ADSLChecker
        )

    [OperationResponse] => Array
        (
            [PostCode] => E173EQ
            [ErrorCode] => 0
            [FullMsg] => Postcode only checks will not return any result for fibre services (FTTP, FTTC:VDSL and G.fast).

For all ADSL services, the stable line rate will be determined during the first 10 days of service usage.

Throughput/download speeds will be less than line rates and can be affected by a number of factors within and external to BT's network, Communication Providers' networks and within customer premises.
The Stop Sale date for Datastream is from 30-Jun-2012; the Formal Retirement date for Datastream is from 30-Jun-2014. The Stop Sale date for IPstream is from 30-Nov-2012; the Formal Retirement date for IPstream is from 30-Jun-2014.
            [ExtraMsg] => Please note that postcode and address check results are indicative only. Most accurate results can be obtained from a telephone number, NAD, UPRN or Access Line ID (ALID) check.
Note: If you decide to place an order for a WBC fibre product, an appointment may be required for an engineer to visit the end user's premises to supply the service.


Thank you for your interest.
            [FixedRate] => Array
                (
                    [RAG] => G
                    [ExchangeState] => E
                    [ReasonCode] => Z
                )

            [RateAdaptive] => Array
                (
                    [RAG] => G
                    [ExchangeState] => E
                    [ReasonCode] => Z
                )

            [Max] => Array
                (
                    [RAG] => G
                    [Speed] => 6000
                    [ExchangeState] => E
                    [ReasonCode] => Z
                )

            [WBC] => Array
                (
                    [RAG] => G
                    [Speed] => 11000
                    [ExchangeState] => E
                    [Band] => 1
                    [ReasonCode] => Z
                )

            [AnnexM] => Array
                (
                    [ExchangeState] => E
                    [Band] => 1
                    [ReasonCode] => Z
                )

            [Fttc] => Array
                (
                    [Band] => 1
                )

            [ExchangeCode] => LNWTH
            [ExchangeName] => WALTHAMSTOW
            [ReasonCode] => Z
            [LLU] => Array
                (
                    [Speed] => 0
                    [ExchangeState] => Unknown
                    [ReasonCode] => A
                )

        )

)
...