3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<soap:Body> <CreateContact xmlns="http://www.tigerpawsoftware.com"> <pram> <OfficePhoneNumber>8387909727</OfficePhoneNumber> <EmailAddress>asheesh9308@gmail.com</EmailAddress> </pram> </CreateContact> </soap:Body>'; $p = xml_parser_create(); xml_parse_into_struct($p, $xml, $vals, $index); xml_parser_free($p); echo '<pre>'; $out = array("OfficePhoneNumber" => $vals[$index['OFFICEPHONENUMBER'][0]]['value'], "EmailAddress" => $vals[$index['EMAILADDRESS'][0]]['value']); print_r($out);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KcJMX
function name:  (null)
number of ops:  29
compiled vars:  !0 = $xml, !1 = $p, !2 = $vals, !3 = $index, !4 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Csoap%3ABody%3E%0A%09%09%09%3CCreateContact+xmlns%3D%22http%3A%2F%2Fwww.tigerpawsoftware.com%22%3E%0A%09%09%09+%3Cpram%3E%0A%09%09%09+++%3COfficePhoneNumber%3E8387909727%3C%2FOfficePhoneNumber%3E%0A%09%09%09+++%3CEmailAddress%3Easheesh9308%40gmail.com%3C%2FEmailAddress%3E%0A%09%09%09++%3C%2Fpram%3E%0A%09%09%09%3C%2FCreateContact%3E%0A%09%09++%3C%2Fsoap%3ABody%3E'
   12     1        INIT_FCALL                                               'xml_parser_create'
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !1, $6
   13     4        INIT_FCALL                                               'xml_parse_into_struct'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !2
          8        SEND_REF                                                 !3
          9        DO_ICALL                                                 
   14    10        INIT_FCALL                                               'xml_parser_free'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   16    13        ECHO                                                     '%3Cpre%3E'
   17    14        FETCH_DIM_R                                      ~10     !3, 'OFFICEPHONENUMBER'
         15        FETCH_DIM_R                                      ~11     ~10, 0
         16        FETCH_DIM_R                                      ~12     !2, ~11
         17        FETCH_DIM_R                                      ~13     ~12, 'value'
         18        INIT_ARRAY                                       ~14     ~13, 'OfficePhoneNumber'
         19        FETCH_DIM_R                                      ~15     !3, 'EMAILADDRESS'
         20        FETCH_DIM_R                                      ~16     ~15, 0
         21        FETCH_DIM_R                                      ~17     !2, ~16
         22        FETCH_DIM_R                                      ~18     ~17, 'value'
         23        ADD_ARRAY_ELEMENT                                ~14     ~18, 'EmailAddress'
         24        ASSIGN                                                   !4, ~14
   18    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.65 ms | 1396 KiB | 21 Q