3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1395 KiB | 21 Q