3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.93 ms | 1394 KiB | 19 Q