3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(2,5,4,7,8,3,9); reset($arr); next($arr); echo key($arr); next($arr); echo key($arr); next($arr); echo key($arr); next($arr); echo key($arr); $barr = $arr; echo key($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ia4Vt
function name:  (null)
number of ops:  38
compiled vars:  !0 = $arr, !1 = $barr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'reset'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    8     4        INIT_FCALL                                               'next'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                                 
    9     7        INIT_FCALL                                               'key'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ECHO                                                     $5
   10    11        INIT_FCALL                                               'next'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                                 
   11    14        INIT_FCALL                                               'key'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        ECHO                                                     $7
   12    18        INIT_FCALL                                               'next'
         19        SEND_REF                                                 !0
         20        DO_ICALL                                                 
   13    21        INIT_FCALL                                               'key'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $9      
         24        ECHO                                                     $9
   14    25        INIT_FCALL                                               'next'
         26        SEND_REF                                                 !0
         27        DO_ICALL                                                 
   15    28        INIT_FCALL                                               'key'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $11     
         31        ECHO                                                     $11
   17    32        ASSIGN                                                   !1, !0
   19    33        INIT_FCALL                                               'key'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $13     
         36        ECHO                                                     $13
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.81 ms | 1396 KiB | 19 Q