3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.73 ms | 1398 KiB | 17 Q