3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8"?> <condition type="or"> <event objType="s" objectId="144" eventType="tr" event="triggered"/> <event objType="s" objectId="149" eventType="tr" event="triggered"/> <event objType="s" objectId="159" eventType="tr" event="triggered"/> <event objType="s" objectId="160" eventType="tr" event="triggered"/> <event objType="s" objectId="145" eventType="tr" event="triggered"/> </condition>'; $obj = new SimpleXMLIterator($xml); var_dump($obj); foreach ($obj->event as $event) { echo $event->{@attributes}['objectId'] . '<br/>'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/oDRlK
function name:  (null)
number of ops:  21
compiled vars:  !0 = $xml, !1 = $obj, !2 = $event
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Ccondition+type%3D%22or%22%3E%0A++%3Cevent+objType%3D%22s%22+objectId%3D%22144%22+eventType%3D%22tr%22+event%3D%22triggered%22%2F%3E%0A++%3Cevent+objType%3D%22s%22+objectId%3D%22149%22+eventType%3D%22tr%22+event%3D%22triggered%22%2F%3E%0A++%3Cevent+objType%3D%22s%22+objectId%3D%22159%22+eventType%3D%22tr%22+event%3D%22triggered%22%2F%3E%0A++%3Cevent+objType%3D%22s%22+objectId%3D%22160%22+eventType%3D%22tr%22+event%3D%22triggered%22%2F%3E%0A++%3Cevent+objType%3D%22s%22+objectId%3D%22145%22+eventType%3D%22tr%22+event%3D%22triggered%22%2F%3E%0A%3C%2Fcondition%3E'
   11     1        NEW                                              $4      'SimpleXMLIterator'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   13     8        FETCH_OBJ_R                                      ~8      !1, 'event'
          9      > FE_RESET_R                                       $9      ~8, ->19
         10    > > FE_FETCH_R                                               $9, !2, ->19
   14    11    >   BEGIN_SILENCE                                    ~10     
         12        FETCH_CONSTANT                                   ~11     'attributes'
         13        END_SILENCE                                              ~10
         14        FETCH_OBJ_R                                      ~12     !2, ~11
         15        FETCH_DIM_R                                      ~13     ~12, 'objectId'
         16        CONCAT                                           ~14     ~13, '%3Cbr%2F%3E'
         17        ECHO                                                     ~14
   13    18      > JMP                                                      ->10
         19    >   FE_FREE                                                  $9
   15    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.38 ms | 1396 KiB | 15 Q