3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = ['A', 'B', 'C', 'D']; echo current($list) . "\n"; echo next($list) . "\n"; echo prev($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fR9PT
function name:  (null)
number of ops:  16
compiled vars:  !0 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'current'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      $2, '%0A'
          5        ECHO                                                     ~3
    6     6        INIT_FCALL                                               'next'
          7        SEND_REF                                                 !0
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      $4, '%0A'
         10        ECHO                                                     ~5
    7    11        INIT_FCALL                                               'prev'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                         $6      
         14        ECHO                                                     $6
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.85 ms | 1394 KiB | 19 Q