3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.63 ms | 1394 KiB | 17 Q