3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <smses count="1099"> <sms protocol="0" address="" date="" type="" subject="" body="" toa="null" sc_toa="null" service_center="null" read="1" status="-1" locked="0" date_sent="null" readable_date="" contact_name="" /> </smses> XML; $dom = new DOMDocument(); $dom->loadXML($xml); $smses = $smses->getElementsByTagName('sms'); foreach ($smses as $sms) { foreach ($sms->attributes as $attr) { $name = $attr->nodeName; $value = $attr->nodeValue; echo "Attribute '$name' :: '$value'"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 29
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 29
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 27
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 27
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/S2ffK
function name:  (null)
number of ops:  31
compiled vars:  !0 = $xml, !1 = $dom, !2 = $smses, !3 = $sms, !4 = $attr, !5 = $name, !6 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Csmses+count%3D%221099%22%3E+++%3Csms+protocol%3D%220%22+address%3D%22%22+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%0A+++++++++++date%3D%22%22+type%3D%22%22+subject%3D%22%22+body%3D%22%22+toa%3D%22null%22+sc_toa%3D%22null%22++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%0A+++++++++++service_center%3D%22null%22+read%3D%221%22+status%3D%22-1%22+locked%3D%220%22++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%0A+++++++++++date_sent%3D%22null%22+readable_date%3D%22%22+contact_name%3D%22%22+%2F%3E+%3C%2Fsmses%3E'
   11     1        NEW                                              $8      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $8
   12     4        INIT_METHOD_CALL                                         !1, 'loadXML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   14     7        INIT_METHOD_CALL                                         !2, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'sms'
          9        DO_FCALL                                      0  $12     
         10        ASSIGN                                                   !2, $12
   15    11      > FE_RESET_R                                       $14     !2, ->29
         12    > > FE_FETCH_R                                               $14, !3, ->29
   16    13    >   FETCH_OBJ_R                                      ~15     !3, 'attributes'
         14      > FE_RESET_R                                       $16     ~15, ->27
         15    > > FE_FETCH_R                                               $16, !4, ->27
   17    16    >   FETCH_OBJ_R                                      ~17     !4, 'nodeName'
         17        ASSIGN                                                   !5, ~17
   18    18        FETCH_OBJ_R                                      ~19     !4, 'nodeValue'
         19        ASSIGN                                                   !6, ~19
   19    20        ROPE_INIT                                     5  ~22     'Attribute+%27'
         21        ROPE_ADD                                      1  ~22     ~22, !5
         22        ROPE_ADD                                      2  ~22     ~22, '%27+%3A%3A+%27'
         23        ROPE_ADD                                      3  ~22     ~22, !6
         24        ROPE_END                                      4  ~21     ~22, '%27'
         25        ECHO                                                     ~21
   16    26      > JMP                                                      ->15
         27    >   FE_FREE                                                  $16
   15    28      > JMP                                                      ->12
         29    >   FE_FREE                                                  $14
   21    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.36 ms | 1390 KiB | 13 Q