3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.51 ms | 940 KiB | 14 Q