3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = [1, 2, 3]; next($foo); var_dump(current($foo)); unset($foo[0]); var_dump(current($foo)); next($foo); var_dump(current($foo));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O4NOO
function name:  (null)
number of ops:  27
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'next'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'current'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    8    10        UNSET_DIM                                                !0, 0
   10    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'current'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
   11    17        INIT_FCALL                                               'next'
         18        SEND_REF                                                 !0
         19        DO_ICALL                                                 
   13    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'current'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $8      
         24        SEND_VAR                                                 $8
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.01 ms | 1395 KiB | 19 Q