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) );
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
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/BJbAk
function name:  (null)
number of ops:  30
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                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.75 ms | 1388 KiB | 19 Q