3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1, 2, 3, 4); echo key($arr), "=>", current($arr), "\r\n"; foreach ($arr as $key => $row) { echo key($arr), "=>", current($arr), "\r\n"; next($arr); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 28
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/acK4f
function name:  (null)
number of ops:  30
compiled vars:  !0 = $arr, !1 = $row, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'key'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ECHO                                                     $4
          5        ECHO                                                     '%3D%3E'
          6        INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ECHO                                                     $5
         10        ECHO                                                     '%0D%0A'
    5    11      > FE_RESET_R                                       $6      !0, ->28
         12    > > FE_FETCH_R                                       ~7      $6, !1, ->28
         13    >   ASSIGN                                                   !2, ~7
    7    14        INIT_FCALL                                               'key'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $9      
         17        ECHO                                                     $9
         18        ECHO                                                     '%3D%3E'
         19        INIT_FCALL                                               'current'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $10     
         22        ECHO                                                     $10
         23        ECHO                                                     '%0D%0A'
    8    24        INIT_FCALL                                               'next'
         25        SEND_REF                                                 !0
         26        DO_ICALL                                                 
    5    27      > JMP                                                      ->12
         28    >   FE_FREE                                                  $6
    9    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.83 ms | 1396 KiB | 19 Q