3v4l.org

run code in 500+ PHP versions simultaneously
<?php $result = '<?xml version="1.0" encoding="UTF-8"?> <PrintLetterBarcodeData uid="123" name="Demo Name" gender="M" yob="2000" gname="Abdul Mannan" lm="city" vtc="City2" po="norway" dist="california" subdist="Ny" state="US" pc="12345" dob="22/06/2000"/>'; $array=json_decode(json_encode(simplexml_load_string($result)),true); foreach($array['@attributes'] as $k=>$v){ echo "<div>$k : $v</div>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 23
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/S8nsc
function name:  (null)
number of ops:  25
compiled vars:  !0 = $result, !1 = $array, !2 = $v, !3 = $k
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+%3CPrintLetterBarcodeData+uid%3D%22123%22+name%3D%22Demo+Name%22+gender%3D%22M%22+yob%3D%222000%22+gname%3D%22Abdul+Mannan%22+lm%3D%22city%22+vtc%3D%22City2%22+po%3D%22norway%22+dist%3D%22california%22+subdist%3D%22Ny%22+state%3D%22US%22+pc%3D%2212345%22+dob%3D%2222%2F06%2F2000%22%2F%3E'
    3     1        INIT_FCALL                                                   'json_decode'
          2        INIT_FCALL                                                   'json_encode'
          3        INIT_FCALL                                                   'simplexml_load_string'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $5      
          6        SEND_VAR                                                     $5
          7        DO_ICALL                                             $6      
          8        SEND_VAR                                                     $6
          9        SEND_VAL                                                     <true>
         10        DO_ICALL                                             $7      
         11        ASSIGN                                                       !1, $7
    4    12        FETCH_DIM_R                                          ~9      !1, '%40attributes'
         13      > FE_RESET_R                                           $10     ~9, ->23
         14    > > FE_FETCH_R                                           ~11     $10, !2, ->23
         15    >   ASSIGN                                                       !3, ~11
    5    16        ROPE_INIT                                         5  ~14     '%3Cdiv%3E'
         17        ROPE_ADD                                          1  ~14     ~14, !3
         18        ROPE_ADD                                          2  ~14     ~14, '+%3A+'
         19        ROPE_ADD                                          3  ~14     ~14, !2
         20        ROPE_END                                          4  ~13     ~14, '%3C%2Fdiv%3E%0A'
         21        ECHO                                                         ~13
    4    22      > JMP                                                          ->14
         23    >   FE_FREE                                                      $10
    6    24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.45 ms | 2163 KiB | 16 Q