3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><Body><Response TID="c4ed40a4-8e91-46ee-b571-9ace4c47f642" xmlns:ns="http://wsg.avis.com/wsbang"><OTA_VehResRS xsi:schemaLocation="http://www.opentravel.org/OTA/2008/05 OTA_VehResRS" EchoToken="CT" Target="Production" Version="1.0" SequenceNmbr="0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05"><Success/><VehResRSCore><VehReservation><VehSegmentCore><Vendor>Budget</Vendor></VehSegmentCore></VehReservation></VehResRSCore><Errors><Error Type="3" ShortText="30212 BizRule">Invalid Value for payment amount</Error></Errors></OTA_VehResRS><!-- Processed by Direct Connect ver. 12.0 build 0 --></Response></Body></Envelope>'; $objXml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); $rootelement = $objXml->getName(); $hello[$rootelement] = json_decode(json_encode($objXml), TRUE); var_dump($hello);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kiQUg
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xml, !1 = $objXml, !2 = $rootelement, !3 = $hello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3CEnvelope+xmlns%3ASOAP-ENV%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22%3E%3CBody%3E%3CResponse+TID%3D%22c4ed40a4-8e91-46ee-b571-9ace4c47f642%22+xmlns%3Ans%3D%22http%3A%2F%2Fwsg.avis.com%2Fwsbang%22%3E%3COTA_VehResRS+xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opentravel.org%2FOTA%2F2008%2F05+OTA_VehResRS%22+EchoToken%3D%22CT%22+Target%3D%22Production%22+Version%3D%221.0%22+SequenceNmbr%3D%220%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3D%22http%3A%2F%2Fwww.opentravel.org%2FOTA%2F2003%2F05%22%3E%3CSuccess%2F%3E%3CVehResRSCore%3E%3CVehReservation%3E%3CVehSegmentCore%3E%3CVendor%3EBudget%3C%2FVendor%3E%3C%2FVehSegmentCore%3E%3C%2FVehReservation%3E%3C%2FVehResRSCore%3E%3CErrors%3E%3CError+Type%3D%223%22+ShortText%3D%2230212+BizRule%22%3EInvalid+Value+for+payment+amount%3C%2FError%3E%3C%2FErrors%3E%3C%2FOTA_VehResRS%3E%3C%21--+Processed+by+Direct+Connect+ver.+12.0+build+0+--%3E%3C%2FResponse%3E%3C%2FBody%3E%3C%2FEnvelope%3E'
    3     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'SimpleXMLElement'
          4        SEND_VAL                                                 16384
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    4     7        INIT_METHOD_CALL                                         !1, 'getName'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !2, $7
    5    10        INIT_FCALL                                               'json_decode'
         11        INIT_FCALL                                               'json_encode'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $11     
         17        ASSIGN_DIM                                               !3, !2
         18        OP_DATA                                                  $11
    6    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.7 ms | 1396 KiB | 21 Q