3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("one"=>1,"two"=>2,"three"=>3); foreach($a as &$b) { var_dump( key($a) ); var_dump( current($a) ); } var_dump( key($a) ); var_dump( current($a) ); foreach($a as $b) { var_dump( key($a) ); var_dump( current($a) ); } var_dump( key($a) ); var_dump( current($a) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 44
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 44
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
Branch analysis from position: 16
filename:       /in/RSS8r
function name:  (null)
number of ops:  58
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_RW                                      $3      !0, ->16
          2    > > FE_FETCH_RW                                              $3, !1, ->16
    7     3    >   INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'key'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'current'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
    5    15      > JMP                                                      ->2
         16    >   FE_FREE                                                  $3
   11    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'key'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                                 
   12    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'current'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $10     
         27        SEND_VAR                                                 $10
         28        DO_ICALL                                                 
   15    29      > FE_RESET_R                                       $12     !0, ->44
         30    > > FE_FETCH_R                                               $12, !1, ->44
   17    31    >   INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'key'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $13     
         35        SEND_VAR                                                 $13
         36        DO_ICALL                                                 
   18    37        INIT_FCALL                                               'var_dump'
         38        INIT_FCALL                                               'current'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                         $15     
         41        SEND_VAR                                                 $15
         42        DO_ICALL                                                 
   15    43      > JMP                                                      ->30
         44    >   FE_FREE                                                  $12
   21    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'key'
         47        SEND_VAR                                                 !0
         48        DO_ICALL                                         $17     
         49        SEND_VAR                                                 $17
         50        DO_ICALL                                                 
   22    51        INIT_FCALL                                               'var_dump'
         52        INIT_FCALL                                               'current'
         53        SEND_VAR                                                 !0
         54        DO_ICALL                                         $19     
         55        SEND_VAR                                                 $19
         56        DO_ICALL                                                 
         57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.02 ms | 1400 KiB | 19 Q