php simpleXMLElement to array: null value

后端 未结 3 1773
南方客
南方客 2021-02-14 13:49

I\'ve got following XML:


    123
    
    ACTIVE

         


        
3条回答
  •  离开以前
    2021-02-14 14:25

    Check performance str_replace vs recursive loop

    • Iterations: 100000
    • XML length: 4114 bytes
    • Init script time: ~1.2264486691986E-6 seconds
    • JSON encode/decode time: ~9.8956169957496E-5 seconds
    • str_replace average time: 0.00010692856433176 seconds
    • recursive loop average time: 0.00011844366600813 seconds

    The str_replace quickly on ~0.00001 seconds. The difference will be noticeable in many calls

提交回复
热议问题