3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a_xml = <<<XML <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.example.com/v1/services"> <soapenv:Header/> <soapenv:Body> <ser:getAnalyticalDeliveryEstimatesRequest> <ser:buyer> <ser:buyerId>1233</ser:buyerId> <ser:toCountry>IN</ser:toCountry> <ser:toZip>110001</ser:toZip> </ser:buyer> <ser:item> <ser:id>25164</ser:id> <ser:categoryId>15032</ser:categoryId> <ser:seller> <ser:sellerId>11997</ser:sellerId> <ser:fromCountry>IN</ser:fromCountry> </ser:seller> <ser:transactionId>0</ser:transactionId> </ser:item> </ser:getAnalyticalDeliveryEstimatesRequest> </soapenv:Body> </soapenv:Envelope> XML; $xml = simplexml_load_string( $a_xml ); $xml->registerXPathNamespace('soapenv', 'http://schemas.xmlsoap.org/soap/envelope/'); $xml->registerXPathNamespace('ser', 'http://www.example.com/v1/services'); $xpath = $xml->xpath( '//soapenv:Body/ser:getAnalyticalDeliveryEstimatesRequest' ); echo $node->name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tuDA6
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a_xml, !1 = $xml, !2 = $xpath, !3 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Csoapenv%3AEnvelope+xmlns%3Asoapenv%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22%0A+++++xmlns%3Aser%3D%22http%3A%2F%2Fwww.example.com%2Fv1%2Fservices%22%3E%0A++++%3Csoapenv%3AHeader%2F%3E%0A++++%3Csoapenv%3ABody%3E%0A++++++++%3Cser%3AgetAnalyticalDeliveryEstimatesRequest%3E%0A++++++++++++%3Cser%3Abuyer%3E%0A++++++++++++++++%3Cser%3AbuyerId%3E1233%3C%2Fser%3AbuyerId%3E%0A++++++++++++++++%3Cser%3AtoCountry%3EIN%3C%2Fser%3AtoCountry%3E%0A++++++++++++++++%3Cser%3AtoZip%3E110001%3C%2Fser%3AtoZip%3E%0A++++++++++++%3C%2Fser%3Abuyer%3E%0A++++++++++++%3Cser%3Aitem%3E%0A++++++++++++++++%3Cser%3Aid%3E25164%3C%2Fser%3Aid%3E%0A++++++++++++++++%3Cser%3AcategoryId%3E15032%3C%2Fser%3AcategoryId%3E%0A++++++++++++++++%3Cser%3Aseller%3E%0A++++++++++++++++++++%3Cser%3AsellerId%3E11997%3C%2Fser%3AsellerId%3E%0A++++++++++++++++++++%3Cser%3AfromCountry%3EIN%3C%2Fser%3AfromCountry%3E%0A++++++++++++++++%3C%2Fser%3Aseller%3E%0A++++++++++++++++%3Cser%3AtransactionId%3E0%3C%2Fser%3AtransactionId%3E%0A++++++++++++%3C%2Fser%3Aitem%3E%0A++++++++%3C%2Fser%3AgetAnalyticalDeliveryEstimatesRequest%3E%0A++++%3C%2Fsoapenv%3ABody%3E%0A%3C%2Fsoapenv%3AEnvelope%3E'
   28     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   29     5        INIT_METHOD_CALL                                         !1, 'registerXPathNamespace'
          6        SEND_VAL_EX                                              'soapenv'
          7        SEND_VAL_EX                                              'http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F'
          8        DO_FCALL                                      0          
   30     9        INIT_METHOD_CALL                                         !1, 'registerXPathNamespace'
         10        SEND_VAL_EX                                              'ser'
         11        SEND_VAL_EX                                              'http%3A%2F%2Fwww.example.com%2Fv1%2Fservices'
         12        DO_FCALL                                      0          
   32    13        INIT_METHOD_CALL                                         !1, 'xpath'
         14        SEND_VAL_EX                                              '%2F%2Fsoapenv%3ABody%2Fser%3AgetAnalyticalDeliveryEstimatesRequest'
         15        DO_FCALL                                      0  $9      
         16        ASSIGN                                                   !2, $9
   34    17        FETCH_OBJ_R                                      ~11     !3, 'name'
         18        ECHO                                                     ~11
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.33 ms | 1388 KiB | 15 Q