3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo "ArrayObject:\n"; $arrayobject = new ArrayObject([1, 2, 3]); foreach ($arrayobject as $i) { var_dump($i); } foreach ($arrayobject as $i) { var_dump($i); } echo "ArrayIterator:\n"; $arrayiterator = new ArrayIterator([1, 2, 3]); foreach ($arrayiterator as $i) { var_dump($i); } foreach ($arrayiterator as $i) { var_dump($i); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 30
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 30
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 37
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 37
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 30
Branch analysis from position: 18
Branch analysis from position: 11
filename:       /in/KFStB
function name:  (null)
number of ops:  39
compiled vars:  !0 = $arrayobject, !1 = $i, !2 = $arrayiterator
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                         'ArrayObject%3A%0A'
    4     1        NEW                                                  $3      'ArrayObject'
          2        SEND_VAL_EX                                                  <array>
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $3
    5     5      > FE_RESET_R                                           $6      !0, ->11
          6    > > FE_FETCH_R                                                   $6, !1, ->11
    6     7    >   INIT_FCALL                                                   'var_dump'
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                                     
    5    10      > JMP                                                          ->6
         11    >   FE_FREE                                                      $6
    8    12      > FE_RESET_R                                           $8      !0, ->18
         13    > > FE_FETCH_R                                                   $8, !1, ->18
    9    14    >   INIT_FCALL                                                   'var_dump'
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                                     
    8    17      > JMP                                                          ->13
         18    >   FE_FREE                                                      $8
   12    19        ECHO                                                         'ArrayIterator%3A%0A'
   13    20        NEW                                                  $10     'ArrayIterator'
         21        SEND_VAL_EX                                                  <array>
         22        DO_FCALL                                          0          
         23        ASSIGN                                                       !2, $10
   14    24      > FE_RESET_R                                           $13     !2, ->30
         25    > > FE_FETCH_R                                                   $13, !1, ->30
   15    26    >   INIT_FCALL                                                   'var_dump'
         27        SEND_VAR                                                     !1
         28        DO_ICALL                                                     
   14    29      > JMP                                                          ->25
         30    >   FE_FREE                                                      $13
   17    31      > FE_RESET_R                                           $15     !2, ->37
         32    > > FE_FETCH_R                                                   $15, !1, ->37
   18    33    >   INIT_FCALL                                                   'var_dump'
         34        SEND_VAR                                                     !1
         35        DO_ICALL                                                     
   17    36      > JMP                                                          ->32
         37    >   FE_FREE                                                      $15
   19    38      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.41 ms | 2577 KiB | 9 Q