3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <item> <name>Name 1</name> </item> <item> <name>Name 2</name> </item> <item> <name>Name 3</name> </item> <item> <name>Name 4</name> </item> XML; foreach (simplexml_load_string("<root>{$xml}</root>")->item as $item) { $names[] = (string)$item->name; } var_export($names);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/A0MSY
function name:  (null)
number of ops:  20
compiled vars:  !0 = $xml, !1 = $item, !2 = $names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Citem%3E%0A+++%3Cname%3EName+1%3C%2Fname%3E%0A%3C%2Fitem%3E%0A%3Citem%3E%0A+++%3Cname%3EName+2%3C%2Fname%3E%0A%3C%2Fitem%3E%0A%3Citem%3E%0A+++%3Cname%3EName+3%3C%2Fname%3E%0A%3C%2Fitem%3E%0A%3Citem%3E%0A+++%3Cname%3EName+4%3C%2Fname%3E%0A%3C%2Fitem%3E'
   16     1        INIT_FCALL                                               'simplexml_load_string'
          2        ROPE_INIT                                     3  ~5      '%3Croot%3E'
          3        ROPE_ADD                                      1  ~5      ~5, !0
          4        ROPE_END                                      2  ~4      ~5, '%3C%2Froot%3E'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $7      
          7        FETCH_OBJ_R                                      ~8      $7, 'item'
          8      > FE_RESET_R                                       $9      ~8, ->15
          9    > > FE_FETCH_R                                               $9, !1, ->15
   17    10    >   FETCH_OBJ_R                                      ~11     !1, 'name'
         11        CAST                                          6  ~12     ~11
         12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  ~12
   16    14      > JMP                                                      ->9
         15    >   FE_FREE                                                  $9
   19    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.4 ms | 1011 KiB | 15 Q