3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(1 => 'one', 2 => 'two', 3 => 'three'); $iterator =new ArrayIterator($numbers); echo "Before insertion:\n"; foreach ($iterator as $key=>$val) echo " ".$key."=>".$val."\n"; // $object->append('four'); $numbers[] = 'four'; echo "\nAfter appending a new value:\n"; foreach ($iterator as $key=>$val) echo " ".$key."=>".$val."\n"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 28
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 15
filename:       /in/XOSEP
function name:  (null)
number of ops:  30
compiled vars:  !0 = $numbers, !1 = $iterator, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        NEW                                              $5      'ArrayIterator'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
    7     5        ECHO                                                     'Before+insertion%3A%0A'
    8     6      > FE_RESET_R                                       $8      !1, ->15
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->15
          8    >   ASSIGN                                                   !3, ~9
          9        CONCAT                                           ~11     '++++', !3
         10        CONCAT                                           ~12     ~11, '%3D%3E'
         11        CONCAT                                           ~13     ~12, !2
         12        CONCAT                                           ~14     ~13, '%0A'
         13        ECHO                                                     ~14
         14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $8
   11    16        ASSIGN_DIM                                               !0
         17        OP_DATA                                                  'four'
   12    18        ECHO                                                     '%0AAfter+appending+a+new+value%3A%0A'
   13    19      > FE_RESET_R                                       $16     !1, ->28
         20    > > FE_FETCH_R                                       ~17     $16, !2, ->28
         21    >   ASSIGN                                                   !3, ~17
         22        CONCAT                                           ~19     '++++', !3
         23        CONCAT                                           ~20     ~19, '%3D%3E'
         24        CONCAT                                           ~21     ~20, !2
         25        CONCAT                                           ~22     ~21, '%0A'
         26        ECHO                                                     ~22
         27      > JMP                                                      ->20
         28    >   FE_FREE                                                  $16
   15    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.86 ms | 1395 KiB | 13 Q