3v4l.org

run code in 300+ PHP versions simultaneously
<?php $transport = array('foot', 'bike', 'car', 'plane'); $mode = next($transport); // $mode = 'bike'; $mode = next($transport); // $mode = 'car'; $mode = 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/ZOGPf
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        ASSIGN                                                   !1, $3
    5     5        INIT_FCALL                                               'next'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    6     9        INIT_FCALL                                               'prev'
         10        SEND_REF                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    7    13        INIT_FCALL                                               'end'
         14        SEND_REF                                                 !0
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !1, $9
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
203.51 ms | 1394 KiB | 19 Q