3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.88 ms | 1395 KiB | 19 Q