3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. (Code = 62) Position 1 = -2
filename:       /in/QG15K
function name:  (null)
number of ops:  25
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
   6    14        INIT_FCALL                                               'current'
        15        SEND_VAR                                                 !2
        16        DO_ICALL                                         $10     
        17        CONCAT                                           ~11     'b', $10
        18        ECHO                                                     ~11
   7    19        INIT_FCALL                                               'current'
        20        SEND_VAR                                                 !0
        21        DO_ICALL                                         $12     
        22        CONCAT                                           ~13     'c', $12
        23        ECHO                                                     ~13
   8    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0