3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<XML <Property> <images> <image number="1"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627783.jpg </image> <image number="2"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627794.jpg</image> </image> <image number="3"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627792.jpg </image> </images> </Property> XML; $xml = simplexml_load_string($xmlstr); var_dump($xml); foreach ($xml->images->image as $image) { // create an array $images with number as index and url as value $i=$image['number']; $images[$i]=(string)$image; } var_dump($images); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/RHBBK
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xmlstr, !1 = $xml, !2 = $image, !3 = $i, !4 = $images
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3CProperty%3E%0A++++%3Cimages%3E%0A++++++++%3Cimage+number%3D%221%22%3E%0A++++++++++++%3Cimage%3Ehttp%3A%2F%2Fwww.blah.net%2Fshared%2Fdepot%2F3168%2Fbiens%2F149506%2Fimages%2F627783.jpg%0A++++++++%3C%2Fimage%3E%0A++++++++%3Cimage+number%3D%222%22%3E+++%0A+++++++%3Cimage%3Ehttp%3A%2F%2Fwww.blah.net%2Fshared%2Fdepot%2F3168%2Fbiens%2F149506%2Fimages%2F627794.jpg%3C%2Fimage%3E%0A++++++++%3C%2Fimage%3E%0A++++++++%3Cimage+number%3D%223%22%3E%0A++++++++++++%3Cimage%3Ehttp%3A%2F%2Fwww.blah.net%2Fshared%2Fdepot%2F3168%2Fbiens%2F149506%2Fimages%2F627792.jpg%0A++++++++%3C%2Fimage%3E%0A++++%3C%2Fimages%3E%0A%3C%2FProperty%3E'
   18     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
   20     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   22     8        FETCH_OBJ_R                                      ~9      !1, 'images'
          9        FETCH_OBJ_R                                      ~10     ~9, 'image'
         10      > FE_RESET_R                                       $11     ~10, ->18
         11    > > FE_FETCH_R                                               $11, !2, ->18
   25    12    >   FETCH_DIM_R                                      ~12     !2, 'number'
         13        ASSIGN                                                   !3, ~12
   26    14        CAST                                          6  ~15     !2
         15        ASSIGN_DIM                                               !4, !3
         16        OP_DATA                                                  ~15
   22    17      > JMP                                                      ->11
         18    >   FE_FREE                                                  $11
   29    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                                 
   30    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.76 ms | 1396 KiB | 17 Q