3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.69 ms | 1395 KiB | 19 Q