3v4l.org

run code in 300+ PHP versions simultaneously
foreach ($xml->children() as $second_level) { echo $second_level->attributes()->id, "<br>"; echo ((float)$second_level->attributes()->width) * 10, "<br>"; echo ((float)$second_level->attributes()->height) * 10, "<br>"; }<?php $xml = new SimpleXMLElement( '<DOM> <TAB id="ID1" width="30.1" height="0.5" ></TAB> <TAB id="ID2" width="15.7" height="1.8" ></TAB> </DOM>'); foreach ($xml->children() as $second_level) { echo $second_level->attributes()->id, "<br>"; echo (((float)$second_level->attributes()->width) * 10) . "<br>"; echo (((float)$second_level->attributes()->height) * 10) . "<br>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 29
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 29
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/rsV9V
function name:  (null)
number of ops:  31
compiled vars:  !0 = $xml, !1 = $second_level
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     'foreach+%28%24xml-%3Echildren%28%29+as+%24second_level%29+%7B%0A++++echo+%24second_level-%3Eattributes%28%29-%3Eid%2C+%22%3Cbr%3E%22%3B%0A++++echo+%28%28float%29%24second_level-%3Eattributes%28%29-%3Ewidth%29+%2A+10%2C+%22%3Cbr%3E%22%3B%0A++++echo+%28%28float%29%24second_level-%3Eattributes%28%29-%3Eheight%29+%2A+10%2C+%22%3Cbr%3E%22%3B%0A%7D'
    7     1        NEW                                              $2      'SimpleXMLElement'
    8     2        SEND_VAL_EX                                              '%3CDOM%3E%0A++%3CTAB+id%3D%22ID1%22+width%3D%2230.1%22+height%3D%220.5%22+%3E%3C%2FTAB%3E+%0A++%3CTAB+id%3D%22ID2%22+width%3D%2215.7%22+height%3D%221.8%22+%3E%3C%2FTAB%3E%0A%3C%2FDOM%3E'
          3        DO_FCALL                                      0          
    7     4        ASSIGN                                                   !0, $2
   13     5        INIT_METHOD_CALL                                         !0, 'children'
          6        DO_FCALL                                      0  $5      
          7      > FE_RESET_R                                       $6      $5, ->29
          8    > > FE_FETCH_R                                               $6, !1, ->29
   14     9    >   INIT_METHOD_CALL                                         !1, 'attributes'
         10        DO_FCALL                                      0  $7      
         11        FETCH_OBJ_R                                      ~8      $7, 'id'
         12        ECHO                                                     ~8
         13        ECHO                                                     '%3Cbr%3E'
   15    14        INIT_METHOD_CALL                                         !1, 'attributes'
         15        DO_FCALL                                      0  $9      
         16        FETCH_OBJ_R                                      ~10     $9, 'width'
         17        CAST                                          5  ~11     ~10
         18        MUL                                              ~12     ~11, 10
         19        CONCAT                                           ~13     ~12, '%3Cbr%3E'
         20        ECHO                                                     ~13
   16    21        INIT_METHOD_CALL                                         !1, 'attributes'
         22        DO_FCALL                                      0  $14     
         23        FETCH_OBJ_R                                      ~15     $14, 'height'
         24        CAST                                          5  ~16     ~15
         25        MUL                                              ~17     ~16, 10
         26        CONCAT                                           ~18     ~17, '%3Cbr%3E'
         27        ECHO                                                     ~18
   13    28      > JMP                                                      ->8
         29    >   FE_FREE                                                  $6
   17    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.51 ms | 1395 KiB | 13 Q