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); foreach ($xml->images->image as $image) { // create an array $images with number as index and url as value $images[$image['number']]=(string)$image; } var_dump($images); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/9bvf5
function name:  (null)
number of ops:  19
compiled vars:  !0 = $xmlstr, !1 = $xml, !2 = $image, !3 = $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                                         $5      
          4        ASSIGN                                                   !1, $5
   20     5        FETCH_OBJ_R                                      ~7      !1, 'images'
          6        FETCH_OBJ_R                                      ~8      ~7, 'image'
          7      > FE_RESET_R                                       $9      ~8, ->14
          8    > > FE_FETCH_R                                               $9, !2, ->14
   23     9    >   FETCH_DIM_R                                      ~10     !2, 'number'
         10        CAST                                          6  ~12     !2
         11        ASSIGN_DIM                                               !3, ~10
         12        OP_DATA                                                  ~12
   20    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $9
   26    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   27    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.22 ms | 1395 KiB | 17 Q