3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.8 ms | 1395 KiB | 17 Q