3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(1); next($x); $y = $x; var_dump(current($x)); var_dump(current($y)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v5iPY
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x, !1 = $y
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                                                 
    6     4        ASSIGN                                                   !1, !0
    8     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
   10    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'current'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                                 
   11    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.2 ms | 1394 KiB | 19 Q