3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); if ($xml->load("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml")){ $root = $xml->documentElement; $date = $items->item(1)->getAttribute('time'); $items = $root->getElementsByTagName('Cube'); foreach ($items as $item){ echo $item->getAttribute('currency'); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 28
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 28
filename:       /in/JbXQI
function name:  (null)
number of ops:  29
compiled vars:  !0 = $xml, !1 = $root, !2 = $date, !3 = $items, !4 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $5      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    3     3        INIT_METHOD_CALL                                         !0, 'load'
          4        SEND_VAL_EX                                              'http%3A%2F%2Fwww.ecb.europa.eu%2Fstats%2Feurofxref%2Feurofxref-daily.xml'
          5        DO_FCALL                                      0  $8      
          6      > JMPZ                                                     $8, ->28
    4     7    >   FETCH_OBJ_R                                      ~9      !0, 'documentElement'
          8        ASSIGN                                                   !1, ~9
    5     9        INIT_METHOD_CALL                                         !3, 'item'
         10        SEND_VAL_EX                                              1
         11        DO_FCALL                                      0  $11     
         12        INIT_METHOD_CALL                                         $11, 'getAttribute'
         13        SEND_VAL_EX                                              'time'
         14        DO_FCALL                                      0  $12     
         15        ASSIGN                                                   !2, $12
    6    16        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         17        SEND_VAL_EX                                              'Cube'
         18        DO_FCALL                                      0  $14     
         19        ASSIGN                                                   !3, $14
    8    20      > FE_RESET_R                                       $16     !3, ->27
         21    > > FE_FETCH_R                                               $16, !4, ->27
    9    22    >   INIT_METHOD_CALL                                         !4, 'getAttribute'
         23        SEND_VAL_EX                                              'currency'
         24        DO_FCALL                                      0  $17     
         25        ECHO                                                     $17
    8    26      > JMP                                                      ->21
         27    >   FE_FREE                                                  $16
   11    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.27 ms | 1395 KiB | 13 Q