3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:getBundles"> <soapenv:Header> <soapenv:Body> <urn:getBundles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <request xsi:type="urn:getBundlesRequest" xmlns:urn="urn:SelfcareWebservice"> <userid>hexa</userid> <password>hexa123</password> <requestid>000</requestid> <msisdn>60182003838</msisdn> <productname xsi:type="xsd:string"></productname> <bundlename xsi:type="xsd:string"></bundlename> </request> </urn:getBundles> </soapenv:Body> </soapenv:Envelope>'; $sxe = new SimpleXMLElement($xml); // Define some short identifiers for namespaces without relying on their prefix in the XML define('NS_ENV', 'http://schemas.xmlsoap.org/soap/envelope/'); define('NS_SFORCE', 'getBundlesResponse'); // $sxe already represents the soapenv:Envelope node, so we don't need to mention that $result = $sxe->children(NS_ENV)->Body->children(NS_SFORCE)->loginResponse->result->serverUrl; echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lDQK
function name:  (null)
number of ops:  28
compiled vars:  !0 = $xml, !1 = $sxe, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Csoapenv%3AEnvelope+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22+xmlns%3Asoapenv%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22+xmlns%3Aurn%3D%22urn%3AgetBundles%22%3E%0A+++%3Csoapenv%3AHeader%3E%0A+++%3Csoapenv%3ABody%3E%0A++++++%3Curn%3AgetBundles+soapenv%3AencodingStyle%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fencoding%2F%22%3E%0A+++++++++%3Crequest+xsi%3Atype%3D%22urn%3AgetBundlesRequest%22+xmlns%3Aurn%3D%22urn%3ASelfcareWebservice%22%3E%0A++++++++++++%3Cuserid%3Ehexa%3C%2Fuserid%3E%0A++++++++++++%3Cpassword%3Ehexa123%3C%2Fpassword%3E%0A++++++++++++%3Crequestid%3E000%3C%2Frequestid%3E%0A++++++++++++%3Cmsisdn%3E60182003838%3C%2Fmsisdn%3E%0A++++++++++++%3Cproductname+xsi%3Atype%3D%22xsd%3Astring%22%3E%3C%2Fproductname%3E%0A++++++++++++%3Cbundlename+xsi%3Atype%3D%22xsd%3Astring%22%3E%3C%2Fbundlename%3E%0A+++++++++%3C%2Frequest%3E%0A++++++%3C%2Furn%3AgetBundles%3E%0A+++%3C%2Fsoapenv%3ABody%3E%0A%3C%2Fsoapenv%3AEnvelope%3E'
   17     1        NEW                                              $4      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   20     5        INIT_FCALL                                               'define'
          6        SEND_VAL                                                 'NS_ENV'
          7        SEND_VAL                                                 'http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F'
          8        DO_ICALL                                                 
   21     9        INIT_FCALL                                               'define'
         10        SEND_VAL                                                 'NS_SFORCE'
         11        SEND_VAL                                                 'getBundlesResponse'
         12        DO_ICALL                                                 
   24    13        INIT_METHOD_CALL                                         !1, 'children'
         14        FETCH_CONSTANT                                   ~9      'NS_ENV'
         15        SEND_VAL_EX                                              ~9
         16        DO_FCALL                                      0  $10     
         17        FETCH_OBJ_R                                      ~11     $10, 'Body'
         18        INIT_METHOD_CALL                                         ~11, 'children'
         19        FETCH_CONSTANT                                   ~12     'NS_SFORCE'
         20        SEND_VAL_EX                                              ~12
         21        DO_FCALL                                      0  $13     
         22        FETCH_OBJ_R                                      ~14     $13, 'loginResponse'
         23        FETCH_OBJ_R                                      ~15     ~14, 'result'
         24        FETCH_OBJ_R                                      ~16     ~15, 'serverUrl'
         25        ASSIGN                                                   !2, ~16
   26    26        ECHO                                                     !2
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.6 ms | 1401 KiB | 15 Q